Optimizing site performance

From WormBaseWiki
Revision as of 17:57, 16 August 2010 by Cgrove (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Optimizing performance of WormBase

1. Here is a good guide from S. Beckman: [1]

2. Turn off KeepAliveOn

3. Enable perl-status

<Location /perl-status>

   SetHandler perl-script
   PerlHandler Apache::Status
   order deny,allow
   #deny from all
   #allow from ...
 </Location>

(This should be disabled when in production)

4. Check the memory footprint of apache children:

ps -o pid,user,rss,vsize,%cpu,%mem,ucomm -C httpd


5. Monitoring / killing runawy processes Apache::SizeLimit - very handy for killing wild processes perl.startup:

$Apache::SizeLimit::MAX_UNSHARED_SIZE = 300000; # 350 MB
$Apache::SizeLimit::CHECK_EVERY_N_REQUESTS = 2;

httpd.conf

PerlFixupHandler Apache::SizeLimit

Apache::Watchdog::Runaway

A module that monitors hanging Apache/mod_perl processes. You define the time in seconds after which the process to be counted as hanging. You also control the polling time between check to check.

When the process is considered as 'hanging' it will be killed and the event logged into a log file. The log file is being opened on append, so you can basically defined the same log file that uses Apache.