Skip to content

Instantly share code, notes, and snippets.

@lowstz
Last active December 10, 2015 16:59
Show Gist options
  • Save lowstz/4464811 to your computer and use it in GitHub Desktop.
Save lowstz/4464811 to your computer and use it in GitHub Desktop.
部分性能测试

测试环境 tinyvz

CPU Intel(R) Xeon(R) CPU E31220 @ 3.10GHz (共享cpu,4个逻辑核心)
内存 专用128M/突发256M
硬盘 RAID10 10G
网络 1000mbps 共享
OS Ubuntu Server 10.04 LTS
python版本 2.6.5
nginx版本 1.0.15
ApacheBench版本 2.3

环境nginx反向代理(工作进程1个),app.py进程一个

$ ab -c 200 -n 10000 http://v2dig.lowstz.org/

Server Software:        TornadoServer/2.4
Server Hostname:        v2dig.lowstz.org
Server Port:            80

Document Path:          /
Document Length:        8546 bytes

Concurrency Level:      200
Time taken for tests:   69.203 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      88590000 bytes
HTML transferred:       85460000 bytes
Requests per second:    144.50 [#/sec] (mean)
Time per request:       1384.064 [ms] (mean)
Time per request:       6.920 [ms] (mean, across all concurrent requests)
Transfer rate:          1250.14 [Kbytes/sec] received

环境nginx反向代理(工作进程1个),app.py进程两个

$ ab -c 200 -n 10000 http://v2dig.lowstz.org/

Server Software:        TornadoServer/2.4
Server Hostname:        v2dig.lowstz.org
Server Port:            80

Document Path:          /
Document Length:        8546 bytes

Concurrency Level:      200
Time taken for tests:   45.445 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      88590000 bytes
HTML transferred:       85460000 bytes
Requests per second:    220.05 [#/sec] (mean)
Time per request:       908.895 [ms] (mean)
Time per request:       4.544 [ms] (mean, across all concurrent requests)
Transfer rate:          1903.71 [Kbytes/sec] received

环境nginx反向代理(工作进程1个),app.py进程三个

$ ab -c 200 -n 10000 http://v2dig.lowstz.org/

Server Software:        TornadoServer/2.4
Server Hostname:        v2dig.lowstz.org
Server Port:            80

Document Path:          /
Document Length:        8546 bytes

Concurrency Level:      200
Time taken for tests:   27.977 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      88590000 bytes
HTML transferred:       85460000 bytes
Requests per second:    357.44 [#/sec] (mean)
Time per request:       559.541 [ms] (mean)
Time per request:       2.798 [ms] (mean, across all concurrent requests)
Transfer rate:          3092.31 [Kbytes/sec] received

环境nginx反向代理(工作进程2个),app.py进程四个

$ ab -c 200 -n 10000 http://v2dig.lowstz.org/

Server Software:        TornadoServer/2.4
Server Hostname:        v2dig.lowstz.org
Server Port:            80

Document Path:          /
Document Length:        8546 bytes

Concurrency Level:      200
Time taken for tests:   19.664 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      88590000 bytes
HTML transferred:       85460000 bytes
Requests per second:    508.54 [#/sec] (mean)
Time per request:       393.281 [ms] (mean)
Time per request:       1.966 [ms] (mean, across all concurrent requests)
Transfer rate:          4399.58 [Kbytes/sec] received

环境nginx反向代理(工作进程2个),app.py进程五个

$ ab -c 200 -n 10000 http://v2dig.lowstz.org/

Server Software:        TornadoServer/2.4
Server Hostname:        v2dig.lowstz.org
Server Port:            80

Document Path:          /
Document Length:        8546 bytes

Concurrency Level:      200
Time taken for tests:   17.975 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      88590000 bytes
HTML transferred:       85460000 bytes
Requests per second:    556.34 [#/sec] (mean)
Time per request:       359.496 [ms] (mean)
Time per request:       1.797 [ms] (mean, across all concurrent requests)
Transfer rate:          4813.06 [Kbytes/sec] received

环境nginx反向代理(工作进程2个),app.py进程六个

$ ab -c 200 -n 10000 http://v2dig.lowstz.org/

Server Software:        TornadoServer/2.4
Server Hostname:        v2dig.lowstz.org
Server Port:            80

Document Path:          /
Document Length:        8546 bytes

Concurrency Level:      200
Time taken for tests:   18.826 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      88590000 bytes
HTML transferred:       85460000 bytes
Requests per second:    531.19 [#/sec] (mean)
Time per request:       376.514 [ms] (mean)
Time per request:       1.883 [ms] (mean, across all concurrent requests)
Transfer rate:          4595.50 [Kbytes/sec] received
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment