3

The short question is, is there is a definitive, quantifiable overhead to using AccessLogValve over FastCommonAccessLogValve?

If I enable access logging in JBoss 4.2.3GA, I can either use FastCommonAccessLogValve or AccessLogValve (as documented at http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html). FastCommonAccessLogValve is optimised for production use, but will not allow me to log the time that the request took to be processed, which is the key information I am after.

I have run some comparative load tests, placing my application under a light load, so that the overhead of AccessLogValve is not hidden by longer processing times caused by the server load. However any overhead of AccessLogValve compared to FastCommonAccessLogValve or no logging, is smaller than the variation I'm getting from the application itself. For example, compared to a benchmark with no logging valve, I got tests that took on average 99.7% of the time (with AccessLogValve enabled), 103.4% of the time (another run with AccessLogValve enabled), or 105.4% of the time (with FastCommonAccessLogValve) enabled.

Does this range of results suggest the overhead is ~ 5%? Or do I need to spend the time so that my load-test produce much more consistent timings without the logging enabled? It's a complex application, so I'm not sure if this would be possible

matt freake
  • 4,877
  • 4
  • 27
  • 56

1 Answers1

1

I think you are doing the right thing by trying to benchmark your application. The only way to understand the performance impact is to benchmark with and without AccessLogValve.

The developers of AccessLogValve have gone to great lengths to optimize the performance of the valve, at least with the most common patterns the performance is negligible (1-3% in my tests).

Having said that its really hard to say for certain without doing those benchmarks.

Hope this is helpful.

Good luck!

uaarkoti
  • 3,659
  • 2
  • 20
  • 23
  • Thank you. That makes sense. In the end we decided to rely on other logs (web-server logs) but may revisit the JBoss logging. – matt freake Mar 21 '12 at 09:04