On 2/9/07, Oliver Gorwits <[EMAIL PROTECTED]> wrote:

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...


yes we are thinking about that now. however, we are not sure how to update
the cache we we want to refresh the page. i guess we will adjust the http
header when we want to flush it? how does squid know if our page is
refreshed when it has already cached our page though?...

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.


yah, i know that. our catalyst apache servers are only for serving dynamic
pages. however, there are some ajax javascript files we have to host on the
exact same subdomain to work. i still feel that those javascript files are
wasting our apache resources. for ajax javascript like that, how should i
redirect the load to other servers while maintaining the same subdomain in
the location bar? i tried to use mod_rewrite, and seems like its even slower
than serving the file itself!

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.


_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive:
http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/




--
Jeffrey Ng
CEO, Zorpia.com
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to