lighttpd vs nginx – static files сравним скорость серверов
Добавлено: 28 авг 2010, 12:56
Первый мне полюбился ещё в августе того года, но там был не совсем тест двух веб серверов, ну а сейчас я провёл именно полноценный тест двух веб серваков.
Тест сервера NGINX/0.7.62
Код: Выделить всё
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking rezerved.ath.cx (be patient)
Completed 100000 requests
Completed 200000 requests
Completed 300000 requests
Completed 400000 requests
Completed 500000 requests
Completed 600000 requests
Completed 700000 requests
Completed 800000 requests
Completed 900000 requests
Completed 1000000 requests
Finished 1000000 requests
Server Software: nginx/0.7.62
Server Hostname: rezerved.ath.cx
Server Port: 88
Document Path: /
Document Length: 3700 bytes
Concurrency Level: 1000
Time taken for tests: 216.531 seconds
Complete requests: 1000000
Failed requests: 0
Write errors: 0
Total transferred: 3912535944 bytes
HTML transferred: 3700506900 bytes
Requests per second: 4618.27 [#/sec] (mean)
Time per request: 216.531 [ms] (mean)
Time per request: 0.217 [ms] (mean, across all concurrent requests)
Transfer rate: 17645.66 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 155 723.5 28 21173
Processing: 6 60 52.3 40 767
Waiting: 2 48 46.5 32 762
Total: 18 215 728.6 66 21355
Percentage of the requests served within a certain time (ms)
50% 66
66% 73
75% 85
80% 108
90% 365
95% 369
98% 3074
99% 3089
100% 21355 (longest request)
Код: Выделить всё
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking rezerved.ath.cx (be patient)
Completed 100000 requests
Completed 200000 requests
Completed 300000 requests
Completed 400000 requests
Completed 500000 requests
Completed 600000 requests
Completed 700000 requests
Completed 800000 requests
Completed 900000 requests
Completed 1000000 requests
Finished 1000000 requests
Server Software: lighttpd/1.4.22
Server Hostname: rezerved.ath.cx
Server Port: 80
Document Path: /
Document Length: 3700 bytes
Concurrency Level: 1000
Time taken for tests: 187.617 seconds
Complete requests: 1000000
Failed requests: 0
Write errors: 0
Total transferred: 3935633535 bytes
HTML transferred: 3700595700 bytes
Requests per second: 5330.02 [#/sec] (mean)
Time per request: 187.617 [ms] (mean)
Time per request: 0.188 [ms] (mean, across all concurrent requests)
Transfer rate: 20485.34 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 132 699.0 38 21045
Processing: 4 54 19.7 55 759
Waiting: 2 42 17.7 44 733
Total: 8 186 701.2 94 21130
Percentage of the requests served within a certain time (ms)
50% 94
66% 100
75% 104
80% 106
90% 112
95% 122
98% 3079
99% 3106
100% 21130 (longest request)
И тот и другой сервер справиись с тестом на ура, но всё равно кто-то из них был быстрее давайте выйсним кто же именно
1. Время выполнения:
nginx – 216.531 seconds
lighttpd – 187.617 seconds
+ Выиграл lighttpd на 28,914 секундами
2. Пропускная способность
nginx – 17645.66 [Kbytes/sec]
lighttpd – 20485.34 [Kbytes/sec]
+ выиграл lighttpd на 2839,68 КБ в секунду, или быстрее на 2,8 МБ в секунду
3. Сгенерированный трафик
nginx – 3912535944 bytes
lighttpd – 3935633535 bytes
+ выиграл nginx потратив на 23097591 байт или 11,8 мегабайт меньше
Если у нас с вами безлимитный канал на магистрали то на 3 пункт а именно на то что nginx сэкономил нам 12 метров трафика можно не обращать внимания, кто сейчас вообще следит за трафиком?
Источник