[root@lb1 ~]# ab -c 160 -n 10000 http://blog.benet.com/index.html
This is ApacheBench, Version 2.3<$Revision:1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking blog.benet.com (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests
Server Software: nginx
Server Hostname: blog.benet.com
Server Port: 80
Document Path: /index.html
Document Length: 146 bytes
Concurrency Level: 160
Time taken for tests: 1.552 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Non-2xx responses: 10000
Total transferred: 2890000 bytes
HTML transferred: 1460000 bytes
Requests per second: 6441.86[#/sec] (mean)
Time per request: 24.838[ms](mean)
Time per request: 0.155[ms](mean, across all concurrent requests)
Transfer rate: 1818.06[Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0635.141014
Processing: 41812.716227
Waiting: 11611.914223
Total: 62537.5211039
Percentage of the requests served within a certain time(ms)50% 2166% 2675% 2880% 2990% 3495% 4398% 7199% 86100% 1039(longest request)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
2、进行1000个并发访问,发出1000000个请求
[root@lb1 ~]# ab -c 1000 -n 1000000 http://blog.benet.com/index.html
This is ApacheBench, Version 2.3<$Revision:1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking blog.benet.com (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
Server Hostname: blog.benet.com
Server Port: 80
Document Path: /index.html
Document Length: 146 bytes
Concurrency Level: 1000
Time taken for tests: 169.644 seconds
Complete requests: 1000000
Failed requests: 0
Write errors: 0
Non-2xx responses: 1000000
Total transferred: 289000000 bytes
HTML transferred: 146000000 bytes
Requests per second: 5894.71[#/sec] (mean)
Time per request: 169.644[ms](mean)
Time per request: 0.170[ms](mean, across all concurrent requests)
Transfer rate: 1663.64[Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0127430.71263127
Processing: 34248.5302015
Waiting: 13747.3252004
Total: 5169437.04463176
Percentage of the requests served within a certain time(ms)50% 4466% 5675% 6980% 8290% 25895% 105698% 111399% 1260100% 63176(longest request)[root@localhost ~]# toptop - 22:58:19 up 3:52, 3 users, load average: 0.81, 0.23, 0.11
Tasks: 113 total, 2 running, 111 sleeping, 0 stopped, 0 zombie
%Cpu0 :6.6 us, 31.5 sy, 0.0 ni, 61.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu1 :3.7 us, 15.8 sy, 0.0 ni, 46.5 id, 0.0 wa, 0.0 hi, 34.1 si, 0.0 st
KiB Mem :1863252 total, 1240008 free, 120596 used, 502648 buff/cache
KiB Swap: 2097148 total, 2097148 free, 0 used. 1550180 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31295 root 2002812283248968 S 22.60.20:10.92 nginx
31297 root 20028118032601060 S 22.60.20:10.91 nginx
31296 root 20028104829881056 S 15.90.20:07.40 nginx
31298 root 20028091629961036 S 15.90.20:07.39 nginx
[root@localhost ~]# toptop - 22:58:31 up 2:28, 2 users, load average: 1.52, 0.44, 0.19
Tasks: 111 total, 5 running, 106 sleeping, 0 stopped, 0 zombie
%Cpu0 :8.1 us, 28.2 sy, 0.0 ni, 63.4 id, 0.0 wa, 0.0 hi, 0.4 si, 0.0 st
%Cpu1 :3.6 us, 14.9 sy, 0.0 ni, 45.5 id, 0.0 wa, 0.0 hi, 36.0 si, 0.0 st
KiB Mem :1863252 total, 1232120 free, 123276 used, 507856 buff/cache
KiB Swap: 2097148 total, 2097148 free, 0 used. 1544800 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31782 root 2002804322632976 S 21.90.10:13.91 nginx
31784 root 20028043226921036 R 21.90.10:13.87 nginx
31785 root 2002810162996988 R 16.90.20:09.72 nginx
31783 root 2002810442996960 R 16.60.20:09.70 nginx
14 root 200000 R 10.30.00:06.80 ksoftirqd/1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
2、webbench测试
1、模拟300个并发连接持续60s
[root@lb1 ~]# webbench -c 300 -t 60 http://blog.benet.com/index.html
Webbench - Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://blog.benet.com/index.html
300 clients, running 60 sec.
Speed=405924 pages/min, 1955195 bytes/sec.
Requests: 405924 susceed, 0 failed.
[root@localhost ~]# toptop - 23:09:54 up 4:04, 3 users, load average: 0.89, 0.54, 0.35
Tasks: 113 total, 4 running, 109 sleeping, 0 stopped, 0 zombie
%Cpu(s): 9.1 us, 31.9 sy, 0.0 ni, 34.0 id, 0.0 wa, 0.0 hi, 25.0 si, 0.0 st
%Node0 :9.3 us, 31.9 sy, 0.0 ni, 34.0 id, 0.0 wa, 0.0 hi, 24.8 si, 0.0 st
KiB Mem :1863252 total, 1013728 free, 120636 used, 728888 buff/cache
KiB Swap: 2097148 total, 2097148 free, 0 used. 1547000 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31297 root 20028118032601060 R 32.20.21:06.54 nginx
31295 root 2002812283248968 R 31.90.21:06.43 nginx
31296 root 20028104829881056 R 24.30.20:48.36 nginx
31298 root 20028091629961036 S 23.60.20:48.18 nginx
[root@localhost ~]# toptop - 23:10:09 up 2:40, 2 users, load average: 1.66, 0.79, 0.47
Tasks: 111 total, 5 running, 106 sleeping, 0 stopped, 0 zombie
%Cpu0 :13.1 us, 42.2 sy, 0.0 ni, 44.3 id, 0.0 wa, 0.0 hi, 0.4 si, 0.0 st
%Cpu1 :6.8 us, 19.4 sy, 0.0 ni, 25.5 id, 0.0 wa, 0.0 hi, 48.2 si, 0.0 st
KiB Mem :1863252 total, 1003164 free, 123860 used, 736228 buff/cache
KiB Swap: 2097148 total, 2097148 free, 0 used. 1541224 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31784 root 20028043226921036 R 31.30.11:10.83 nginx
31782 root 2002804322632976 R 30.70.11:10.77 nginx
31783 root 2002810442996960 S 25.00.20:52.58 nginx
31785 root 2002810162996988 R 24.00.20:52.68 nginx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
2、模拟5000个并发连接持续60s
[root@lb1 ~]# webbench -c 5000 -t 60 http://blog.benet.com/index.html
Webbench - Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://blog.benet.com/index.html
5000 clients, running 60 sec.
Speed=956522 pages/min, 4599838 bytes/sec.
Requests: 956512 susceed, 10 failed.
[root@localhost ~]# toptop - 23:15:06 up 4:09, 3 users, load average: 0.65, 0.93, 0.62
Tasks: 114 total, 5 running, 109 sleeping, 0 stopped, 0 zombie
%Cpu(s): 8.6 us, 31.5 sy, 0.0 ni, 36.8 id, 0.0 wa, 0.0 hi, 23.1 si, 0.0 st
KiB Mem :1863252 total, 796524 free, 120420 used, 946308 buff/cache
KiB Swap: 2097148 total, 2097148 free, 0 used. 1544416 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31295 root 2002812283248968 R 30.90.22:07.21 nginx
31297 root 20028118032601060 R 30.20.22:07.58 nginx
31296 root 20028104829881056 R 23.30.21:34.33 nginx
31298 root 20028091629961036 R 22.60.21:34.18 nginx
[root@localhost ~]# toptop - 23:15:34 up 2:45, 2 users, load average: 1.12, 1.21, 0.80
Tasks: 112 total, 8 running, 104 sleeping, 0 stopped, 0 zombie
%Cpu0 :13.9 us, 41.6 sy, 0.0 ni, 44.1 id, 0.0 wa, 0.0 hi, 0.4 si, 0.0 st
%Cpu1 :6.0 us, 22.5 sy, 0.0 ni, 23.2 id, 0.0 wa, 0.0 hi, 48.2 si, 0.0 st
KiB Mem :1863252 total, 771432 free, 123768 used, 968052 buff/cache
KiB Swap: 2097148 total, 2097148 free, 0 used. 1538088 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31782 root 2002804322632976 R 31.20.12:15.77 nginx
31784 root 20028043226921036 R 31.20.12:16.02 nginx
31783 root 2002810442996960 R 25.20.21:42.50 nginx
31785 root 2002810162996988 R 25.20.21:42.55 nginx
31784 root 20028043226921036 R 31.20.12:16.02 nginx
31783 root 2002810442996960 R 25.20.21:42.50 nginx
31785 root 2002810162996988 R 25.20.21:42.55 nginx