{"id":342,"date":"2006-10-31T14:23:35","date_gmt":"2006-10-31T13:23:35","guid":{"rendered":"http:\/\/wp.devco.net\/?p=342"},"modified":"2009-10-09T14:17:08","modified_gmt":"2009-10-09T13:17:08","slug":"webserver_performance","status":"publish","type":"post","link":"https:\/\/www.devco.net\/archives\/2006\/10\/31\/webserver_performance.php","title":{"rendered":"Webserver Performance"},"content":{"rendered":"
I look after a site that serves up a lot of static content, early on already I ran into issues with Apache coping on one machine, also my bandwidth at my main site is pretty expensive so I started farming off my static content to a number of machines hosted at other ISPs, typically paying around 100 pounds per machine per month, as long as I push out less than around 100Gb\/month it’s a pretty good deal.
\nThe only problem I have is I get tons of SYN_RECV connections on each of my machines, around 300 of them at any given time. Typically these indicate a lot of connections waiting to be served but the servers handle new requests immediately, there are no time spent waiting for IO on the servers, in fact the CPU’s are 98% idle always.
\nIn an effort to try and resolve this (after much tuning of server sysctl’s) I asked Jaco<\/a> if he’s seen it before and he suggested giving Lighttpd<\/a> a try.
\nI installed it on one of my 3 static servers and ran it for a few days now and the results are encouraging. I still have 300 SYN_RECV’s but the machine is performing much faster than its siblings. On average before Lighttpd I was getting 30 requests\/sec out of each of my machines now this one is doing around 50\/sec, it is also pushing out about 30Kb\/sec more than the other two. Comparing the Lighttpd machine to 2 apache machines on a graph shows it consistently out performs the others by about 20%.
\n\n
\n Uptime<\/td>\n 4 days 21 hours 19 min 20 s<\/td>\n<\/tr>\n \n Requests<\/td>\n 18 Mreq<\/td>\n<\/tr>\n \n Traffic<\/td>\n 20.77 Gbyte<\/td>\n<\/tr>\n \n Requests<\/td>\n 105 req\/s<\/td>\n<\/tr>\n \n Traffic<\/td>\n 89.99 kbyte\/s<\/td>\n<\/tr>\n<\/table>\n