Performance effect of enabling apache response time log directive
Asked Answered
B

1

6

What affect will enabling the response time (%D) LogFormat directive have on apache performance?

The response time is the time taken to serve a request in microseconds.

Response time can be enabled like so:

#LogFormat "%h %l %u %t \"%r\" %>s %b"    # Default LogFormat
LogFormat "%h %l %u %t \"%r\" %>s %b %D"  # LogFormat including response time

I have written a tool for monitoring and analysing backend script performance, apache-response-time, which requires response time data. I would like to warn potential users how enabling this directive will affect apache server performance.

Bruch answered 29/10, 2009 at 16:13 Comment(1)
you can also use %>D to get the total response time including any internal redirectsDebroahdebs
A
7

Probably not worth considering in terms of HTTP responses -- only the overhead of 1 addl gettimeofday() call (and a few function calls) so something on the order of a few microseconds. Apache already notes the same thing when the request arrives.

http://www.atl.lmco.com/projects/QoS/POSIX_html/index.html lists some old microbenchmarks of gettimeofday() itself.

Aragonite answered 10/1, 2011 at 3:6 Comment(1)
Assuming the OP cares because something else is serving dynamic content, the time for Apache to output response time is going to be minimal in the context of the CPU it takes to actually create the page.Fixative

© 2022 - 2024 — McMap. All rights reserved.