<br><br><div><span class="gmail_quote">On 2/10/07, <b class="gmail_sendername">Tony Losey</b> <<a href="mailto:tlosey@3sixtygroup.com">tlosey@3sixtygroup.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Fri February 9 2007 12:53 pm, Jeffrey Ng wrote:<br>> On 2/9/07, Oliver Gorwits <<a href="mailto:oliver.gorwits@oucs.ox.ac.uk">oliver.gorwits@oucs.ox.ac.uk</a>> wrote:<br>> > Jeffrey Ng wrote:<br>> > > I am the coworker of Fayland who posted the topic "memory usage of
<br>> > > mod_perl process".<br>> > ><br>> > > Our company has invested quite some time on migrating our perl code to<br>> > > catalyst (more than half year of time by 7 programmers). However, I am
<br>> > > starting to worry that moving to catalyst is causing too much overhead<br>> > > for our processes and thus severely slowing down our site.<br>> ><br>> > Take a good, hard look at what's coming out of your web servers. Install
<br>> > a Squid farm in front of the servers and let them cache anything<br>> > suitable...<br>><br>> yes we are thinking about that now. however, we are not sure how to update<br>> the cache we we want to refresh the page. i guess we will adjust the http
<br>> header when we want to flush it? how does squid know if our page is<br>> refreshed when it has already cached our page though?...<br>><br><br>You can call the PURGE command on squid. You must allow this in the conf and
<br>put in place the proper acl to allow it. I believe you can call squid with<br>the following options to force a purge of the cache of a given page.<br><br>-m PURGE <a href="http://mywebsite.com/index.html">http://mywebsite.com/index.html
</a><br><br>We are not using catalyst in production yet so we don't have squid running in<br>front of any catalyst apps. We do however have it running in front of some<br>python/zope/plone sites. There are plugins that handle the purging directly
<br>for us. We just provide the url to purge to a method that handles the purge<br>when needed.</blockquote><div><br>right! i just googled and found <a href="http://search.cpan.org/~sock/Net-Squid-Purge-0.1/">http://search.cpan.org/~sock/Net-Squid-Purge-0.1/
</a><br>that cpan module should be able to purge the cached.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> letting Apache fork just to serve an image can be really damaging to
<br>><br>> > performance. Double check the HTTP headers on all outgoing pages include<br>> > proper caching instructions for Squid so it'll work properly.<br>><br>> yah, i know that. our catalyst apache servers are only for serving dynamic
<br>> pages. however, there are some ajax javascript files we have to host on the<br>> exact same subdomain to work. i still feel that those javascript files are<br>> wasting our apache resources. for ajax javascript like that, how should i
<br>> redirect the load to other servers while maintaining the same subdomain in<br>> the location bar? i tried to use mod_rewrite, and seems like its even<br>> slower than serving the file itself!<br>><br>> Even whole store-front pages from Catalyst sites can usually be cached
<br>><br>> > well, because users don't have state at that point, and perhaps most<br>> > hits are to your homepage (so remember to let Squid know your homepage<br>> > is cacheable, in the headers).
<br>> ><br>> > Remember mod_perl can be quite leaky as well, so kill off the child<br>> > processes after they've served a few requests. Oh, and switch off<br>> > hyperthreading if you have dual P4/Xeon boxes, and use PreFork MPM.
<br>> ><br>> > There's more info in the slides from this LPW talk:<br>> ><br>> ><br>> > <a href="http://london.pm.org/lpw/talks/2006/dave_hodgkinson-mod_perl_server_farm_">http://london.pm.org/lpw/talks/2006/dave_hodgkinson-mod_perl_server_farm_
</a><br>> >architecture_done_right.pdf<br>> ><br>> > HTH,<br>> ><br>> > oliver.<br>> ><br>> ><br>> > _______________________________________________<br>> > List: <a href="mailto:Catalyst@lists.rawmode.org">
Catalyst@lists.rawmode.org</a><br>> > Listinfo: <a href="http://lists.rawmode.org/mailman/listinfo/catalyst">http://lists.rawmode.org/mailman/listinfo/catalyst</a><br>> > Searchable archive:<br>> > <a href="http://www.mail-archive.com/catalyst@lists.rawmode.org/">
http://www.mail-archive.com/catalyst@lists.rawmode.org/</a><br>> > Dev site: <a href="http://dev.catalyst.perl.org/">http://dev.catalyst.perl.org/</a><br><br>_______________________________________________<br>List:
<a href="mailto:Catalyst@lists.rawmode.org">Catalyst@lists.rawmode.org</a><br>Listinfo: <a href="http://lists.rawmode.org/mailman/listinfo/catalyst">http://lists.rawmode.org/mailman/listinfo/catalyst</a><br>Searchable archive:
<a href="http://www.mail-archive.com/catalyst@lists.rawmode.org/">http://www.mail-archive.com/catalyst@lists.rawmode.org/</a><br>Dev site: <a href="http://dev.catalyst.perl.org/">http://dev.catalyst.perl.org/</a><br></blockquote>
</div><br><br clear="all"><br>-- <br>Jeffrey Ng<br>CEO, <a href="http://Zorpia.com">Zorpia.com</a>