Personal tools
You are here: Home kaeru's blog Archive 2007 December 28 Efficient use of Resources
Document Actions

Efficient use of Resources

by kaeru last modified 2007-12-28 15:32

This afternoon, I finished replacing Apache httpd with Cherokee on Inigo's main server. Now Squid is handling access to all http services first, with Pound handling the management of the backend servers.

There really wasn't much need for Apache httpd, as we don't use most of it's features and without tuning, it takes up a lot of memory just to do rewrites, http proxy for the backends and logging.

Squid uses much less memory, and is very fast. Kagesenshi is working on tighter integration with Cachefu for the Plone sites. Even without that, you will find that sites like http://foss.org.my are now snappy (1.02 seconds total according to firebug). It's improved the speed of http://mirror.inigo-tech.com also which is a slow external USB drive.

The performance bottleneck now is actually memory. While FreeBSD's virtual memory does an awesome job (we're using 1201MB of swap at time of writing), we are now running 4 separate virtual servers, each running it's own self contained services. Not much more we can optimize now. Long idle processes of course, take several seconds to swap back in. So adding another 1GB of memory (total 2GB) will give quite a bit of breathing space and get rid of that lag.

For those that are curious, all this including http://www.apdip.net which used to sit it's own server is running on RM2.5K worth of hardware.

nginx

Posted by k4ml at 2007-12-28 10:02
Me too ditched off apache and fallback on nginx for my vps. After switching to nginx I just can't remember the last time I restart the process. One of the site I host is a blog which got around 1000-2000 visitors per day (according to google analytics) and the vps only have 256M of memory. Apache would down to its knee just after few minutes even with much tweaking to the config files. Lighttpd can hold much longer, up to few hours before start leaking memory and just die. Nginx on the hand has been running for a few months I guess. With 2 worker (I read somehere 1 already enough) process and 7 PHP process running as FastCGI it still has a room of 32M left for something else.

Cherokee look's interesting, I might have a look on it sometime in the future.


Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: