Performance effect of enabling apache response time log directive

戏子无情 提交于 2019-12-05 00:24:50

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/1644839/performance-effect-of-enabling-apache-response-time-log-directive

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!