After reading blog.zabiello.com I reached a conclusion that before I start the new project I should check Nginx instead of going directly to solution preferred at present lighttpd. Below are simplified results of tests and conclusions.
Configuration of the hardware and software
- Pentium of III 733MHz, 256 MB, 32-bit
- Ubuntu Server 7.10
- lighttpd 1.4.18 (from 7.10 distribution)
- nginx 0.5.26 (from 7.10 distribution)
- Django trunk (FCGI tests on socket connection)
- tests made for n = 10000
Simplified results of tests
First, I tested the local file (1 kB) on the same computer through ab. About 1700 req/s in both cases. Difference in results about 1% for c = 1, as well as for c = 10.
A next test is a bare Django application (only a default project), so without database but with debug enabled. Results for Django also turned out to be very similar. About 170 req/s for both servers (FCGI communication through socket).
Next I carried series of tests from the outside computer, much stronger than the server computer (the laptop computer, Athlon 64 3700; 2.4 GHz) and on it I made the test for c = 200. Tests turned out to be less interesting, because of the transfer rates in the local network (100 Mbit) it is even harder to pick the winner. Static files are being served 200 req/s (minimal differences), and Django at this parallelism 140 req/s for nginx and 150 req/s for lighttpd.
Conclusions
I can see two conclusions. We shouldn't test in the local loop for static files when comparing these two servers. Results are running away from what it is possible to reach in fact on the standard connection. Already even author of lighttpd noticed that in the majority of the situation at first we would reach to limits of I/O than limits of processor, so for these two so similar servers testing static files has secondary meaning. From the other side I am surprised with FCGI speed from Django using so weak server for this days. Getting 150 req/s now means getting about 50 running real site.
The other conclusion results from first, choice in my case depends mainly on own preferences, so I am staying at the moment with lighttpd, because I know it better...
0 komentarze:
Post a Comment