ab -c 10 -n 10000 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 1000 requests
...
Finished 10000 requests
Server Software: nginx
Server Hostname: test1.ru
Server Port: 80
Document Path: /
Document Length: 4965 bytes
Concurrency Level: 10
Time taken for tests: 215.649745 seconds
Complete requests: 10000
Failed requests: 16
(Connect: 0, Length: 16, Exceptions: 0)
Write errors: 0
Non-2xx responses: 16
Total transferred: 51509264 bytes
HTML transferred: 49579184 bytes
Requests per second: 46.37 [#/sec] (mean)
Time per request: 215.650 [ms] (mean)
Time per request: 21.565 [ms] (mean, across all concurrent requests)
Transfer rate: 233.26 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 1 74.2 0 3032
Processing: -2873 217 936.8 167 46218
Waiting: 0 218 933.3 166 46218
Total: 0 219 933.8 167 46218
Percentage of the requests served within a certain time (ms)
50% 167
66% 170
75% 172
80% 173
90% 176
95% 179
98% 184
99% 843
100% 46218 (longest request)
При этом MySQL аккаунтинг показывает следующие цифры
Total_connections 9984
Connected_time 1517
Busy_time 10
Cpu_time 11
Bytes_received 23 783 628
Bytes_sent 179 513 360
Rows_fetched 83415
Rows_updated 8
Table_rows_read 223534
Select_commands 20253
То есть в среднем 1 открытие блога выходит 1 соединение с MySQL, 17 килобайт чтения с БД, 2 select запроса, чтение 8 строк с таблиц.
Но вот исходной задачи - узнать, какую часть времени движок тратит на работу с БД я так и не решил. Вот, похоже как это решать правильно: http://codex.wordpress.org/Testing_WordPress_Performance
No comments :
Post a Comment
Note: only a member of this blog may post a comment.