前段时间对网易云新版vpc性能进行了性能测试,测试覆盖了多种镜像,包含不同操作系统。由,使用的测试工具也不尽相同。当时在工具安装使用上踩了很多坑,现在对不同测试环境使用的测试工具进行总结。
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
87380 16384 32000 10.00 1923.23
里面只有吞吐量,不包含平均延时、延时90值等参数指标。如果需要输出延迟时间等指标,则需要在测试命令后面添加-O参数:
Maximum Mean 90th 99th Throughput Throughput
Latency Latency Percentile Percentile Units
Microseconds Microseconds Latency Latency
Microseconds Microseconds
233568 130.09 6 1592 1924.18 10^6bits/s
root@ima1-0-4:~# netperf -t TCP_STREAM -H 13.20.1.116 -l 10 -- -m 32k -O "MIN_LAETENCY,MAX_LATENCY,MEAN_LATENCY,P90_LATENCY,P99_LATENCY,THROUGHPUT,THROUGHPUT_UNITS"
netperf: invalid option -- 'O'
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 13.20.1.116 (13.20.1.116) port 0 AF_INET : demo
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
87380 16384 32000 10.00 5227.17
Maximum Mean 90th 99th Throughput Throughput
Latency Latency Percentile Percentile Units
Microseconds Microseconds Latency Latency
Microseconds Microseconds
15804 0.33 1 1 1137.17 10^6bits/s
2)不加-O参数测试结果:
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec
87380 16384 64 30.00 1901.55
因此-O参数应该根据实际情况进行选择。
[root@ima0-0-test ~]# yum install netperf
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
No package netperf available.
Error: Nothing to do
[root@ima0-0-test ~]# yum install iperf
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
No package iperf available.
Error: Nothing to do
[root@ima0-0-test iperf-2.0.5]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether the C++ compiler works... no
configure: error: in `/home/iperf-2.0.5':
configure: error: C++ compiler cannot create executables
See `config.log' for more details.
[root@ima0-0-test iperf-2.0.5]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)
service iptables stop
网易云新用户大礼包:https://www.163yun.com/gift
本文来自网易实践者社区,经作者季涛授权发布。