测试服务器性能

使用docker快速测试服务器性能

安装docker

curl -sSL https://get.docker.io | sh

测试

docker run registry.saas.hand-china.com/paas/benchvm:latest

默认测试docker存储目录所在的卷,如果需要测试其他卷,请在其他卷所有的目录下创建一个文件夹,并绑定到容器中的/disktest/中。如:

mkdir -p /u01/distest
docker run -v /u01/distest:/disktest registry.saas.hand-china.com/paas/benchvm:latest

测试结果及描述

参考值指在阿里云ECS中测试,符合使k8s能够稳定运行的数据。

==== test network and io

TERM environment variable not set.

1:此处显示主机的基本信息

CPU model : Intel Core Processor (Broadwell, IBRS)

Number of cores : 4

CPU frequency : 2099.998 MHz

Total size of Disk : 164.1 GB (112.0 GB Used)

Total amount of Mem : 15885 MB (7436 MB Used)

Total amount of Swap : 16379 MB (2180 MB Used)

System uptime : 33 days, 0 hour 47 min

Load average : 8.58, 8.05, 9.07

OS : CentOS 7.5.1804

Arch : x86_64 (64 Bit)

Kernel : 3.10.0-862.3.2.el7.x86_64

2:此处为磁盘写速度,最后结果取三次平均值

I/O write speed(1st run) : 67.8 MB/s

I/O write speed(2nd run) : 69.1 MB/s

I/O write speed(3rd run) : 66.2 MB/s

Average I/O speed : 67.7 MB/s

参考值: 106.0 MB/s > 80MB/s

3:此处为磁盘读速度,最后结果取三次平均值

I/O read speed(1st run) : 340 MB/s

I/O read speed(2nd run) : 641 MB/s

I/O read speed(3rd run) : 838 MB/s

Average I/O speed : 606.3 MB/s

参考值: 5324.8 MB/s > 5000 MB/s

4:此处为网速,Node Name表示下载或上传的节点

Node Name Upload Speed Download Speed Latency

Speedtest.net 6.07 Mbit/s 329.95 Mbit/s 21.807 ms

Shanghai CT 5.59 Mbit/s 272.21 Mbit/s 12.68 ms

Hangzhou CT 6.13 Mbit/s 670.12 Mbit/s 7.966 ms

Chengdu CT 6.05 Mbit/s 436.18 Mbit/s 54.206 ms

Shanghai CU 3.34 Mbit/s 320.77 Mbit/s 281.01 ms

Xi’an CU 6.13 Mbit/s 322.81 Mbit/s 33.098 ms

Chongqing CU 5.95 Mbit/s 451.86 Mbit/s 83.213 ms

Xi’an CM 5.84 Mbit/s 323.16 Mbit/s 89.645 ms

Chengdu CM 6.06 Mbit/s 359.10 Mbit/s 40.391 ms

———————————————————————-

==== test cpu

5:此处为CPU处理速度测试,Total time越小越好

WARNING: the –test option is deprecated. You can pass a script name or path on the command line without any options.

sysbench 1.0.9 (using system LuaJIT 2.0.4)


Running the test with following options:

Number of threads: 1

Initializing random number generator from current time



Prime numbers limit: 20000


Initializing worker threads…


Threads started!


CPU speed:

events per second: 200.59


General statistics:

total time: 10.0058s

参考值:10.0019s < 10.01s

total number of events: 2008


Latency (ms):

min: 3.50

avg: 4.97

max: 48.62

95th percentile: 7.98

sum: 9983.61


Threads fairness:

events (avg/stddev): 2008.0000/0.00

execution time (avg/stddev): 9.98360.00


==== test cpu 4 thread

6:此处多线程CPU处理速度测试,Total time越小越好

WARNING: the –test option is deprecated. You can pass a script name or path on the command line without any options.

WARNING: –num-threads is deprecated, use –threads instead

sysbench 1.0.9 (using system LuaJIT 2.0.4)


Running the test with following options:

Number of threads: 4

Initializing random number generator from current time



Prime numbers limit: 20000


Initializing worker threads…


Threads started!


CPU speed:

events per second: 1218.23


General statistics:

total time: 10.0126s

参考值:10.0028s < 10.01s

total number of events: 4635


Latency (ms):

min: 3.51

avg: 8.62

max: 141.88

95th percentile: 22.28

sum: 39947.59


Threads fairness:

events (avg/stddev): 1158.7500121.93

execution time (avg/stddev): 9.98690.01


==== test memory block size 1M

7:测试内存速度,Total time越小越好

WARNING: the –test option is deprecated. You can pass a script name or path on the command line without any options.

sysbench 1.0.9 (using system LuaJIT 2.0.4)


Running the test with following options:

Number of threads: 1

Initializing random number generator from current time



Running memory speed test with the following options:

block size: 1024KiB

total size: 10240MiB

operation: write

scope: global


Initializing worker threads…


Threads started!


Total operations: 10240 ( 5602.56 per second)


10240.00 MiB transferred (5602.56 MiB/sec)



General statistics:

total time: 1.8241s

参考值: 0.7639s < 0.8s

total number of events: 10240


Latency (ms):

min: 0.09

avg: 0.18

max: 25.23

95th percentile: 0.23

sum: 1808.56


Threads fairness:

events (avg/stddev): 10240.0000/0.00

execution time (avg/stddev): 1.80860.00


==== test memory block size 500M

8:测试内存速度,Total time越小越好

WARNING: the –test option is deprecated. You can pass a script name or path on the command line without any options.

sysbench 1.0.9 (using system LuaJIT 2.0.4)


Running the test with following options:

Number of threads: 1

Initializing random number generator from current time



Running memory speed test with the following options:

block size: 1KiB

total size: 2048MiB

operation: write

scope: global


Initializing worker threads…


Threads started!


Total operations: 2097152 (1861771.36 per second)


2048.00 MiB transferred (1818.14 MiB/sec)



General statistics:

total time: 1.1237s

参考值: 0.8193s < 0.9s

total number of events: 2097152


Latency (ms):

min: 0.00

avg: 0.00

max: 7.07

95th percentile: 0.00

sum: 504.43


Threads fairness:

events (avg/stddev): 2097152.0000/0.00

execution time (avg/stddev): 0.50440.00

VinkDong

open to open