You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Greg Stark <gs...@mit.edu> on 2000/02/18 18:05:57 UTC

Problem with rotatelogs? high cpu usage

I've been trying to figure out why our web servers have loads of 30-60+ and I
think I just found the culprit: rotatelogs.

Removing rotatelogs the load immediately dropped to 10 and hovered around
10-12. That's actually a reasonable level given my calculations about the
database latency and the number of processes we have.

Why would rotatelogs cause high cpu usage? Does the httpd spin waiting to
acquire some lock on the pipe? Or does the write fail and it keeps retrying? 
I don't really believe either of these hypotheses though, and I've run strace
which of course doesn't help much.

Actually, I replaced the |rotatelogs with /dev/null. So it's possible it's
some other portion of the logging code. But it still seems wrong to me that it
would cause high cpu usage.

-- 
greg