启用响应时间(%D)LogFormat指令对apache性能有什么影响?

响应时间是以微秒为单位提供请求所需的时间。

响应时间可以这样启用:

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

我编写了一个监视和分析后端脚本性能的工具, apache-response-time ,需要响应时间数据。我想警告潜在用户如何启用此指令将影响Apache服务器性能。

有帮助吗?

解决方案

在HTTP响应方面可能不值得考虑 - 只有1 addl gettimeofday()调用(以及一些函数调用)的开销,所以大约几微秒。当请求到达时,Apache已经注意到了同样的事情。

http://www.atl.lmco.com/projects/QoS/POSIX_html/index .html 列出了gettimeofday()本身的一些旧的微基准。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top