Skip to content

Apache versus nginx (versus lighttpd ) part 2

  • by

In postul anterior faceam o comparatie intre apache si nginx. Am luat de data aceasta in calcul si lighttpd.
Am reluat testele pe o masina medie ( o masina care dupa parerea mea ar putea sa fie folosita pentru
proiecte de dimensiuni mici/medii ). Rezultatele testelor:

Dupa cum se poate observa testul cu autobench nu au dat rezultate concludente. E timpul pentru alt model de teste si refacute testele.

Intra in scena ab-ul:

Distributie linux: TFM linux server 32. Pentru toate testele am folosit un fisier html de lungime 7638 bytes. Concurency level pentru teste a fost 500 iar numarul total de cereri a fost 50000.

  • Apache
Server Software:        Apache/2.2.9
Time taken for tests:   61.242098 seconds
Requests per second:    816.43 [#/sec] (mean)
Time per request:       612.421 [ms] (mean)
Time per request:       1.225 [ms] (mean, across all concurrent requests)
Transfer rate:          6317.26 [Kbytes/sec] received

Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0  183 1254.8      5   21012
Processing:     1  238 1759.8    104   61224
Waiting:        0  232 1759.9     97   61220
Total:         17  422 2280.8    109   61234

Percentage of the requests served within a certain time (ms)
50%    109
66%    117
75%    121
80%    122
90%    127
95%    518
98%   3336
99%   9109
100%  61234 (longest request)
  • lighttpd
Server Software:        lighttpd-tfm
Time taken for tests:   37.115939 seconds
Requests per second:    1347.13 [#/sec] (mean)
Time per request:       371.159 [ms] (mean)
Time per request:       0.742 [ms] (mean, across all concurrent requests)
Transfer rate:          10366.70 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        4  172 585.5     82   21075
Processing:     3  191 104.5    165    1898
Waiting:        2   90  52.4     82     952
Total:         12  363 602.3    246   21239

Percentage of the requests served within a certain time (ms)
  50%    246
  66%    247
  75%    248
  80%    248
  90%    328
  95%    693
  98%   3241
  99%   3246
 100%  21239 (longest request)
  • nginx
Server Software:        nginx/0.6.31
Time taken for tests:   36.766920 seconds
Requests per second:    1359.92 [#/sec] (mean)
Time per request:       367.669 [ms] (mean)
Time per request:       0.735 [ms] (mean, across all concurrent requests)
Transfer rate:          10433.21 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0  167 651.4     73   21073
Processing:     7  189 130.6    149    2080
Waiting:        6   86  65.4     74     927
Total:         22  356 670.2    222   22265

Percentage of the requests served within a certain time (ms)
  50%    222
  66%    223
  75%    224
  80%    229
  90%    371
  95%    648
  98%   3217
  99%   3223
 100%  22265 (longest request)

Dupa cum se poate observa per ansamblu nginx s-a comportat cel mai bine, a avut cele mai multe requesturi servite pe secunda. Pe locul doi lighttpd la diferenta foarte mica de nginx. Ultimul clasat s-a dovedit apache-ul la viteza de servire.

Concluzia e simpla. Pentru fisiere statice utilizati lighttpd sau nginx. Alegerea intre ele se face evident functie de caz si in functie de preferinte. Noi nu am pus nginx pe serverele de trafic foarte foarte mare preferind lighttpd-ul. Desigur in tfm gasiti toate cele 3 web servere si il puteti folosi cel care va place mai mult.

2 thoughts on “Apache versus nginx (versus lighttpd ) part 2”

  1. Ar fi interesant un test in care sa fie inclus si IIS si thttpd.
    Eu am facut acum mult timp un benchmark cu IIS, Apache si thttpd dar in se referea doar la multe download-uri mari in care accesezi fisirul mare relativ random. IIS-ul a facut un scor deplorabil, Apache OK si thttpd-ul a fost castigator. La thttpd era interesant si ca se putea limita banda per IP.

  2. thttpd n-am incercat pina acuma. am vazut ca sint citeva site-uri mari care sint powered by thttpd dar eu nu-l aveam pe lista de to test.
    IIS-ul mi se pare irelevant de testat avind in vedere ca eu in productie iis nu pun decit daca nu am absolut nici o alta varianta.

Comments are closed.