[Catalyst] Re: memory usage of mod_perl process

Oliver Gorwits oliver.gorwits at oucs.ox.ac.uk
Thu Feb 8 20:59:23 GMT 2007


Jeffrey Ng wrote:
> I am the coworker of Fayland who posted the topic "memory usage of 
> mod_perl process".
> 
> Our company has invested quite some time on migrating our perl code to 
> catalyst (more than half year of time by 7 programmers). However, I am 
> starting to worry that moving to catalyst is causing too much overhead 
> for our processes and thus severely slowing down our site.

Take a good, hard look at what's coming out of your web servers. Install
a Squid farm in front of the servers and let them cache anything suitable...

letting Apache fork just to serve an image can be really damaging to
performance. Double check the HTTP headers on all outgoing pages include
proper caching instructions for Squid so it'll work properly.

Even whole store-front pages from Catalyst sites can usually be cached
well, because users don't have state at that point, and perhaps most
hits are to your homepage (so remember to let Squid know your homepage
is cacheable, in the headers).

Remember mod_perl can be quite leaky as well, so kill off the child
processes after they've served a few requests. Oh, and switch off
hyperthreading if you have dual P4/Xeon boxes, and use PreFork MPM.

There's more info in the slides from this LPW talk:

http://london.pm.org/lpw/talks/2006/dave_hodgkinson-mod_perl_server_farm_architecture_done_right.pdf

HTH,

oliver.




More information about the Catalyst mailing list