Сделал тесты нагрузочной способности НС.
Поставил у себя на компе nginx и настроил его так, чтобы он отдавал файл со скоростью 40 кбайт/сек. Можно забирать одновременно несколько файлов и все будут отдаваться с этой скоростью. Дальше стал загружать файлы с этого сервера через НС. Для этого использовал утилитку ApacheBench, Version 2.0.40.
Сделал тесты для одновременной загрузки 100, 150 и 200 файлов. 100 и 150 грузятся нормально, а при 200 начинаются сбои из-за большого расхода виртуального адресного пространства. Вот отчеты ApacheBench.
Для Win7
c:\>ab -k -n 100 -c 100 -X 127.0.0.1:8080 http://127.0.0.1/ACE-tutorial.pdf
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 [through 127.0.0.1:8080] (be patient).....done
Server Software: nginx/1.0.2
Server Hostname: 127.0.0.1
Server Port: 80
Document Path: /ACE-tutorial.pdf
Document Length: 633837 bytes
Concurrency Level: 100
Time taken for tests: 16.87920 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Keep-Alive requests: 100
Total transferred: 66433476 bytes
HTML transferred: 66390244 bytes
Requests per second: 6.22 [#/sec] (mean)
Time per request: 16087.919 [ms] (mean)
Time per request: 160.879 [ms] (mean, across all concurrent requests)
Transfer rate: 4032.59 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 1 3 7.7 2 76
Processing: 15398 15647 104.3 15673 15812
Waiting: 247 438 79.4 446 585
Total: 15402 15650 103.7 15674 15815
Percentage of the requests served within a certain time (ms)
50% 15674
66% 15705
75% 15719
80% 15727
90% 15746
95% 15792
98% 15796
99% 15815
100% 15815 (longest request)
c:\>ab -k -n 150 -c 150 -X 127.0.0.1:8080 http://127.0.0.1/ACE-tutorial.pdf
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 [through 127.0.0.1:8080] (be patient).....done
Server Software: nginx/1.0.2
Server Hostname: 127.0.0.1
Server Port: 80
Document Path: /ACE-tutorial.pdf
Document Length: 633837 bytes
Concurrency Level: 150
Time taken for tests: 16.309933 seconds
Complete requests: 150
Failed requests: 0
Write errors: 0
Keep-Alive requests: 150
Total transferred: 100024958 bytes
HTML transferred: 99957982 bytes
Requests per second: 9.20 [#/sec] (mean)
Time per request: 16309.933 [ms] (mean)
Time per request: 108.733 [ms] (mean, across all concurrent requests)
Transfer rate: 5988.99 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 1.3 1 13
Processing: 15575 15901 119.8 15896 16201
Waiting: 426 680 117.9 673 965
Total: 15577 15902 119.6 15897 16202
Percentage of the requests served within a certain time (ms)
50% 15897
66% 15973
75% 15999
80% 16016
90% 16063
95% 16109
98% 16148
99% 16188
100% 16202 (longest request)
c:\>ab -k -n 200 -c 200 -X 127.0.0.1:8080 http://127.0.0.1/ACE-tutorial.pdf
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 [through 127.0.0.1:8080] (be patient)
Completed 100 requests
Finished 200 requests
Server Software: nginx/1.0.2
Server Hostname: 127.0.0.1
Server Port: 80
Document Path: /ACE-tutorial.pdf
Document Length: 0 bytes
Concurrency Level: 200
Time taken for tests: 56.381224 seconds
Complete requests: 200
Failed requests: 182
(Connect: 0, Length: 182, Exceptions: 0)
Write errors: 0
Non-2xx responses: 112
Keep-Alive requests: 69
Total transferred: 56818174 bytes
HTML transferred: 56772254 bytes
Requests per second: 3.55 [#/sec] (mean)
Time per request: 56381.226 [ms] (mean)
Time per request: 281.906 [ms] (mean, across all concurrent requests)
Transfer rate: 984.12 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 3 4.6 3 55
Processing: 12 37790 16572.8 40570 56332
Waiting: 0 32547 16255.9 40570 41112
Total: 14 37793 16573.3 40573 56334
Percentage of the requests served within a certain time (ms)
50% 40573
66% 40687
75% 40905
80% 56012
90% 56147
95% 56255
98% 56290
99% 56327
100% 56334 (longest request)
Для WinXP
C:\>ab -k -n 100 -c 100 -X 127.0.0.1:8080 http://127.0.0.1/ACE-tutorial.pdf
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 [through 127.0.0.1:8080] (be patient).....done
Server Software: nginx/1.0.2
Server Hostname: 127.0.0.1
Server Port: 80
Document Path: /ACE-tutorial.pdf
Document Length: 633837 bytes
Concurrency Level: 100
Time taken for tests: 15.921875 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Keep-Alive requests: 100
Total transferred: 66606324 bytes
HTML transferred: 66562196 bytes
Requests per second: 6.28 [#/sec] (mean)
Time per request: 15921.875 [ms] (mean)
Time per request: 159.219 [ms] (mean, across all concurrent requests)
Transfer rate: 4085.26 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 15578 15701 91.2 15671 15875
Waiting: 140 266 90.0 234 437
Total: 15578 15701 91.2 15671 15875
Percentage of the requests served within a certain time (ms)
50% 15671
66% 15718
75% 15796
80% 15812
90% 15859
95% 15859
98% 15875
99% 15875
100% 15875 (longest request)
C:\>ab -k -n 150 -c 150 -X 127.0.0.1:8080 http://127.0.0.1/ACE-tutorial.pdf
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 [through 127.0.0.1:8080] (be patient).....done
Server Software: nginx/1.0.2
Server Hostname: 127.0.0.1
Server Port: 80
Document Path: /ACE-tutorial.pdf
Document Length: 633837 bytes
Concurrency Level: 150
Time taken for tests: 16.156250 seconds
Complete requests: 150
Failed requests: 0
Write errors: 0
Keep-Alive requests: 150
Total transferred: 99991966 bytes
HTML transferred: 99925214 bytes
Requests per second: 9.28 [#/sec] (mean)
Time per request: 16156.250 [ms] (mean)
Time per request: 107.708 [ms] (mean, across all concurrent requests)
Transfer rate: 6043.98 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 3 34.4 0 421
Processing: 15578 15798 140.1 15796 16046
Waiting: 203 495 53.3 484 625
Total: 15578 15801 141.3 15812 16062
Percentage of the requests served within a certain time (ms)
50% 15812
66% 15875
75% 15906
80% 15937
90% 16031
95% 16046
98% 16046
99% 16046
100% 16062 (longest request)
C:\>ab -k -n 200 -c 200 -X 127.0.0.1:8080 http://127.0.0.1/ACE-tutorial.pdf
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 [through 127.0.0.1:8080] (be patient)
Completed 100 requests
Finished 200 requests
Server Software: nginx/1.0.2
Server Hostname: 127.0.0.1
Server Port: 80
Document Path: /ACE-tutorial.pdf
Document Length: 0 bytes
Concurrency Level: 200
Time taken for tests: 16.468750 seconds
Complete requests: 200
Failed requests: 197
(Connect: 0, Length: 197, Exceptions: 0)
Write errors: 0
Keep-Alive requests: 197
Total transferred: 131917121 bytes
HTML transferred: 131829089 bytes
Requests per second: 12.14 [#/sec] (mean)
Time per request: 16468.750 [ms] (mean)
Time per request: 82.344 [ms] (mean, across all concurrent requests)
Transfer rate: 7822.39 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 2 34.3 0 484
Processing: 281 15557 1895.2 15765 16140
Waiting: 0 511 141.7 578 703
Total: 281 15559 1895.7 15765 16140
Percentage of the requests served within a certain time (ms)
50% 15765
66% 15843
75% 15875
80% 15890
90% 16031
95% 16078
98% 16125
99% 16140
100% 16140 (longest request)
Из тестов видим, что НС способен
одновременно обслуживать 150 запросов, 200 запросов для него уже чрезмерная нагрузка. Также видим, что на WinXP загрузка идет немного резвее.