Some notes on tuning a server for MKDoc.
mod_perl
See the Performance Tuning document from the mod_perl 1.0 User Guide.
Memory Usage
If you install the GTop module and add this code (based on the Calculating Real Memory Usage code) to the end of mkdoc.cgi (before 1;):
use GTop; my $proc_mem = GTop->new->proc_mem($$); my $diff = $proc_mem->size - $proc_mem->share; $diff = $diff/1024; $diff = $diff/1024; my $size = $proc_mem->size; $size = $size/1024; $size = $size/1024; my $share = $proc_mem->share; $share = $share/1024; $share = $share/1024; print STDERR "Difference is $diff MB, Size is $size MB and Share is $share MB\n";
Then you will get lines like this written to the error log:
Difference is 40.4765625 MB, Size is 45.234375 MB and Share is 4.7578125 MB Difference is 40.73828125 MB, Size is 45.49609375 MB and Share is 4.7578125 MB
This basically means that each Apache process uses 40MB of RAM and in addition there is 4MB of shared RAM.