On 2007.08.07, John Buckman <[EMAIL PROTECTED]> wrote:I use AOLserver + lighthttpd on the same machine, different IPs, so that mp3s and GIF/JPEGs are fed off lighthttpd, which is stupid and very fast (it's wikipedia's media server)Out of curiousity--have you benchmarked lighttpd vs. AOLserver (since you already have both set up)? AOL replaced their "ArtBlaster" (very thin, lightweight, single-threaded HTTP server for static assets) a while back and replaced it with AOLserver 4.0, since it was "fastenough" ... if lighttpd's benchmarks are significantly better, I'd liketo try and understand why/how and start tuning AOLserver to match.I'd just like to know if folks are running lighttpd because it truly isfaster, or simply because it isn't AOLserver ...
Yes, two yeasr ago I did 3 benchmarks, with CGI, small GIF image, and large mp3. I also compared aolserver to a simple all-tcl single threaded web server which I obtained off the tcl wiki. All benchmarks below were on a powerpc mac mini, two years ago, with "ab" and 10 simultaneous queries.
900 byte image fetch benchmark: --- apache img fetch: 593 /s aolserver img fetch: between 1019 and 1267/s lighthttp img fetch: 1089/s mathopd img fetch: 900/s tclhttpd: 69/s trivial http w/image cache: 1127/sThis big surprises were how well aolserver did on small images, as well as the all-tcl web server.
requests per second handled with trivial tcl dynamic web page ("hello world"):
--- lighttpd-cgi: 15/second tclhttpd: 32/s apache/php: 120/s aolserver: between 640/s and 750/s trivial all-tcl-web-server http://wiki.tcl.tk/15244: 1162/sUnfortunately, I don't have any notes on the large image benchmark, but let me put some numbers in from memory:
1mb image fetch benchmark: --- apache img fetch: 33 /s aolserver img fetch: around 400/s mathopd img fetch: 750/s lighthttp img fetch: 900/s tclhttpd: 3/s --as far as what lighthttpd and mathopd are doing to get better speeds, is that they both are not multithreaded, they are just a single async loop, serving static files. I remember that this was an option in Aolserver v2, but I believe it went away in v3. The async sending feature really only kicks the performance up with large files that require many writes to a socket. For small files that fit inside 4k, aolserver is really fast.
What my benchmarks found is that except for possibly java-based web servers, nothing comes close to aolserver's performance for web- application building. For small images, aolserver is competitive with lighthttpd. It's only with large files that the async-event- loop approach yields better results.
One other note, is that mathopd/lighthttp use less than 5% of the CPU running the large image benchmark. Mathopd also had an option to use SendFile() (which is no longer available on linux) which offloaded most of the work to the kernel.
I'm including my trivial all-tcl http server, just for reference. What surprised me was how badly performing tclhttpd was in all benchmarks, vs this all-tcl server design.
-john -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
Description: Binary data