Результаты тестов следующие:
Локальный мускул: Requests per second: 55.36 [#/sec] (mean)
Удаленный (без тюнинга - стандартный CentOS MySQL): Requests per second: 44.23 [#/sec] (mean)
Удаленный (с тюнингом): Requests per second: 46.40 [#/sec] (mean)
Локальный:
ab -c 10 -n 1000 http://test1.ru:80/
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 test1.ru (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests
Server Software: nginx
Server Hostname: test1.ru
Server Port: 80
Document Path: /
Document Length: 4970 bytes
Concurrency Level: 10
Time taken for tests: 18.62123 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 5163000 bytes
HTML transferred: 4970000 bytes
Requests per second: 55.36 [#/sec] (mean)
Time per request: 180.621 [ms] (mean)
Time per request: 18.062 [ms] (mean, across all concurrent requests)
Transfer rate: 279.09 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.3 0 7
Processing: 0 207 25.0 210 420
Waiting: 0 207 25.0 209 420
Total: 0 207 25.0 210 420
Percentage of the requests served within a certain time (ms)
50% 210
66% 214
75% 215
80% 217
90% 220
95% 223
98% 227
99% 230
100% 420 (longest request)
Удаленный без тюнинга:
ab -c 10 -n 1000 http://test1.ru:80/
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 test1.ru (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software: nginx
Server Hostname: test1.ru
Server Port: 80
Document Path: /
Document Length: 4915 bytes
Concurrency Level: 10
Time taken for tests: 22.608 seconds
Complete requests: 1000
Failed requests: 6
(Connect: 0, Receive: 0, Length: 6, Exceptions: 0)
Write errors: 0
Non-2xx responses: 6
Total transferred: 5081774 bytes
HTML transferred: 4888744 bytes
Requests per second: 44.23 [#/sec] (mean)
Time per request: 226.083 [ms] (mean)
Time per request: 22.608 [ms] (mean, across all concurrent requests)
Transfer rate: 219.51 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 2 3 0.1 3 3
Processing: 27 223 385.7 182 8266
Waiting: 27 223 385.7 182 8265
Total: 30 226 385.7 184 8268
Percentage of the requests served within a certain time (ms)
50% 184
66% 200
75% 213
80% 222
90% 244
95% 255
98% 275
99% 2110
100% 8268 (longest request)
Удаленный с тюнингом:
ab -c 10 -n 1000 http://test1.ru:80/
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 test1.ru (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software: nginx
Server Hostname: test1.ru
Server Port: 80
Document Path: /
Document Length: 4915 bytes
Concurrency Level: 10
Time taken for tests: 21.550 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 5108000 bytes
HTML transferred: 4915000 bytes
Requests per second: 46.40 [#/sec] (mean)
Time per request: 215.504 [ms] (mean)
Time per request: 21.550 [ms] (mean, across all concurrent requests)
Transfer rate: 231.47 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 2 3 0.1 3 3
Processing: 109 212 33.9 213 291
Waiting: 109 212 33.9 212 290
Total: 112 215 33.9 215 293
Percentage of the requests served within a certain time (ms)
50% 215
66% 236
75% 246
80% 250
90% 259
95% 266
98% 273
99% 277
100% 293 (longest request)
а что же будет если затюнить локальный?
ReplyDeleteОн уже затюненый был :)
ReplyDeleteНепонятно, объясните плз из-за чего удаленный работает быстрее?
ReplyDeleteНе почему=) Он работает медленнее. Локальный - 55 запросов / секунду, удаленный - 46 за счет сетевого оверхеда.
ReplyDeleteой ) как то я не правильно прочитал. спасибо
ReplyDelete