Apache logging degrades performance a lot
I have a server with approx. 2000 vhosts, about 500 of these have their own CustomLog directive, the rest log to the main server log file.I also have a test php-script (that does some simple computations and then return about 30k of data) that i use to measure server performance, together with ab. I run php-scripts though suphp, if that makes any difference.
Now, if i keep things the way they are, my script returns the page in around 300ms (from the local network).
However, if i turn off the CustomLog directives on all the vhosts, so that all 2000 of them log to the main log file, the script runs in around 100ms! Traffic to the server isn't that high, its not running hot by all means. And the filesystem that the log-files are on (on another box via nfs) is on a raid 5 array that is nowhere near its limit. HostNameLookups is Off.
The test script is on one of the vhosts that log to the main server log, so i was thinking it was going to be even slower if everything logged there, but it turned out it was the other way around.
Now to my question (finally eh

Btw i'm running apache 1.3.33, on Debian unstable with a 2.6 kernel. The only module except the standard modules is suphp, that i compiled from source, everything else is from apt.