I switched my personal VPS server (the guy you're reading this blog from) from lighttpd to nginx today after getting fed up with some lighttpd behavior one too many times. It comes down to memory usage, and although my 512 MB Linode has more memory than my 256 MB Slicehost did, it is still not unlimited.

Freckle Pulse Screen

Lighttpd makes a big deal of their non-blocking architecture. That is super cool, until someone, usually a web crawler, clicks a cgit link to an image file in git and it bloats your lighttpd process to 400 MB or more, leading to memory graphs like the one shown here. Cause? The difference between the bandwidth in the input/output pipes; cgit is producing output much quicker than it can be sent to the client, so it all backs up in lighttpd's memory, which later has a hard time getting freed. So much for being lighter weight than Apache.

Exhibit 1 is a link such as the following cgit tree view: land_shallow_topo_2048.jpg. This would have made my VPS unhappy before; nginx exhibits much safer and reasonable behavior when huge files like this are generated.