Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Greetings, I am wondering, whether anybody is using BufferedLogs On with Apache2 and found any issues ? Feature is marked as experimental, but for many years now, so I guess it's rather pretty stable. I am running some servers with constrained disk IO capacity at the moment, so I turned it on hoping that even a small benefit could help in the long run ;-) I do have several to several hundreds requests per seconds so by my thoughts there is really no need to write to log after each request, cause honestly I don't think that my filesystem is the best handler for many unnecessary writes. (OCFS2 shared among several DomUs in the Xen)

share|improve this question

2 Answers 2

up vote 3 down vote accepted

I've used BufferedLogs On in the past, it seems to be stable. It's annoying because you can't see accesses in the real time. :)

share|improve this answer

In case it's helpful to anyone coming across this post, as of Apache 2.4 (which wasn't released when this question was originally asked), the documentation no longer has the experimental warning regarding BufferedLogs. Now it only warns that a server crash may cause loss of log data [i.e. any log entries which haven't been written to disk yet because they are buffered in memory wouldn't be able to be written due to the crash] - see http://httpd.apache.org/docs/2.4/mod/mod_log_config.html#bufferedlogs.

Another word of caution can be found on http://wiki.apache.org/httpd/PerformanceScalingUp#Logging_and_Performance which indicates BufferedLogs being on could cause the log entries to be written out of order. My guess is this would only be the case if multiple VirtualHosts / sites were logging to the same file, but it doesn't clarify in which case(s) this might be expected to happen, and it's possible it applies to even one VirtualHost / site. The page also isn't clear if this applies to all versions or just certain versions.

You can use the BufferedLogs directive to have Apache collect several log lines in memory before writing them to disk. This might yield better performance, but could affect the order in which the server's log is written.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.