Dedicated Server, Lighttpd, VPS

Switching from Apache to Lighttpd

One of my side projects is running a free image hosting site.  FreeImageHostingOn.US with this site I have been pushing out millions of hits a day and as you can imagine it puts a load on many shared hosting providers.  So the other day I grabbed a VPS from Ruby Ring Technologies and I installed the CentOS/LXAdmin image.  Out of the box this VPS screamed.  However I know I could get more performance out of it.  The following six lines of code did more then double the thruput and halved the ram usage.

Add the following lines to the lighttpd.conf file.

server.max-keep-alive-requests = 4
server.max-keep-alive-idle = 4
server.event-handler = “linux-sysepoll” = “linux-sendfile”
server.max-fds = 8192
server.stat-cache-engine = “simple”

As you can see from the following image, things are moving along nicely.

Bandwidth Traffic

The current load on the server is 0.0 and the ram used it 66MB’s for live stats check out this link.  System Usage.

Leave a Reply