我主要做的是Virtual IO, PCI, Network 这几块,提高虚拟机的IO性能。网络性能主要使用netperf,iperf,Ntttcp(win),需要统计吞吐率,CPU利用率,收发包数目,收发字节数,注入中断,IO_exit 等。需要多次测试,调整测试时间,计算平均值,并求标准方差,看看同样环境结果是否稳定,从而确定一些经验值(合理的测试次数,单个测试执行时间等)。
然后对打Patch前后版本的平均值进行比较,评估是否有性能回归bug。顺便给大家推荐一本书[1],大学学的概率论、高数基本都还给老师了,所以还得重新看资料复习。
发程序到社区的时候碰到一个版权问题,NTttcp,微软禁止其他人传播,所以只能提示用户自己去官网下载。我的程序里使用AutoIT脚本自动签订了最终用户许可协议(EULA End User License Agreement),然后在文档、程序、commitlog 里提示如果不同意此协议不要使用此脚本。不清楚是否合法,所以发邮件给内部法律部门咨询了。所以离开自由软件世界是很麻烦的,哈哈。
【1】The Art of Computer Systems Performance Analysis, Raj Jain, 1991.
== average == TCP_STREAM size|sessions|throughput| cpu|normalize| #tx-pkts| #rx-pkts| #tx-byts| #rx-byts|#re-trans|#tx-intr|#rx-intr| #io_exit| #irq_inj|#tpkt/#exit|#rpkt/#irq 256| 1| 1308.58| 25.68| 610.36| 1144659| 2385825| 75548090| 3428969637| 0| 17| 1055042| 847930| 1073171| 1.35| 2.22 %SD 0.0| 0.0| 0.6| 135.4| 135.4| 0.7| 0.5| 0.7| 0.6| 0.0| 0.0| 0.2| 0.6| 0.2| 0.0| 0.6 256| 2| 2303.88| 75.86| 30.37| 751786| 3710773| 49625523| 6004979651| 0| 12| 761053| 237602| 807396| 3.17| 4.59 %SD 0.0| 0.0| 2.8| 1.7| 1.0| 2.2| 0.2| 2.2| 2.7| 0.0| 0.0| 0.2| 4.9| 0.1| 2.7| 0.2 512| 1| 1597.22| 51.31| 31.12| 1344860| 2840991| 88761368| 4181982870| 0| 20| 933259| 691258| 951026| 1.94| 2.99 %SD 0.0| 0.0| 1.9| 1.1| 0.8| 2.9| 1.9| 2.9| 1.8| 0.0| 3.4| 0.3| 2.8| 0.3| 0.4| 1.7 512| 2| 4885.64| 69.81| 68.28| 1546820| 3311501| 102158968| 12433545874| 0| 27| 1036179| 649578| 1063091| 8.02| 2.97 %SD 0.0| 0.0| 49.4| 37.3| 13.4| 111.0| 101.0| 110.9| 46.8| 0.0| 78.6| 97.2| 136.2| 95.6| 103.2| 10.5 TCP_RR size|sessions|throughput| cpu|normalize| #tx-pkts| #rx-pkts| #tx-byts| #rx-byts|#re-trans|#tx-intr|#rx-intr| #io_exit| #irq_inj|#tpkt/#exit|#rpkt/#irq 256| 50| 14433.24| 22.19| 650.52| 288679| 288765| 92951906| 92969020| 0| 4| 288733| 288781| 295057| 1.00| 0.98 %SD 0.0| 0.0| 0.8| 1.2| 2.1| 0.8| 0.8| 0.8| 0.8| 0.0| 0.0| 0.9| 0.8| 1.0| 0.0| 0.0 256| 100| 14473.61| 22.01| 657.84| 289486| 289595| 93211760| 93224643| 0| 5| 289551| 289594| 295647| 1.00| 0.98 %SD 0.0| 0.0| 0.4| 1.9| 1.5| 0.4| 0.4| 0.4| 0.4| 0.0| 0.0| 0.4| 0.4| 0.5| 0.0| 0.0 512| 50| 14399.08| 22.79| 631.82| 287996| 288063| 166455616| 166464572| 0| 4| 288036| 288100| 293729| 1.00| 0.98 %SD 0.0| 0.0| 0.2| 0.2| 0.5| 0.2| 0.2| 0.2| 0.2| 0.0| 0.0| 0.2| 0.2| 0.2| 0.0| 0.0 512| 100| 14280.03| 22.11| 646.46| 285614| 285684| 165079121| 165087633| 0| 5| 285652| 285721| 291826| 1.00| 0.98 %SD 0.0| 0.0| 0.6| 4.0| 4.6| 0.6| 0.6| 0.6| 0.6| 0.0| 0.0| 0.6| 0.6| 0.8| 0.0| 0.0 == average == TCP_STREAM size|sessions|throughput| cpu|normalize| #tx-pkts| #rx-pkts| #tx-byts| #rx-byts|#re-trans|#tx-intr|#rx-intr| #io_exit| #irq_inj|#tpkt/#exit|#rpkt/#irq 256| 1| 1266.19| 50.80| 24.93| 1119642| 2307593| 73896989| 3317818482| 0| 16| 1012795| 774796| 1030026| 1.44| 2.24 %SD 0.0| 0.0| 3.4| 0.4| 3.8| 2.4| 3.2| 2.4| 3.4| 0.0| 4.3| 3.0| 7.0| 3.0| 4.4| 0.0 256| 2| 2305.26| 75.81| 30.41| 754533| 3678855| 49804148| 6006610984| 0| 12| 788165| 254245| 835001| 2.98| 4.41 %SD 0.0| 0.0| 0.7| 1.7| 2.4| 7.9| 0.5| 7.9| 0.7| 0.0| 11.8| 6.1| 14.2| 5.7| 6.2| 5.1 512| 1| 1605.72| 51.13| 31.40| 1337269| 2851899| 88260371| 4202588460| 0| 20| 925052| 699349| 942828| 1.91| 3.02 %SD 0.0| 0.0| 0.9| 0.5| 1.4| 2.1| 0.7| 2.1| 0.9| 0.0| 0.0| 1.2| 2.5| 1.2| 4.4| 0.7 512| 2| 6122.82| 86.66| 70.66| 381147| 1442374| 25249126| 15405306185| 0| 8| 349795| 23027| 372068| 16.57| 3.87 %SD 0.0| 0.0| 2.5| 0.9| 3.4| 5.4| 11.8| 5.4| 2.4| 0.0| 8.3| 5.6| 3.2| 4.8| 8.5| 6.9 TCP_RR size|sessions|throughput| cpu|normalize| #tx-pkts| #rx-pkts| #tx-byts| #rx-byts|#re-trans|#tx-intr|#rx-intr| #io_exit| #irq_inj|#tpkt/#exit|#rpkt/#irq 256| 50| 14515.94| 22.20| 653.98| 290333| 290423| 93484515| 93499043| 0| 4| 290387| 290436| 296923| 1.00| 0.98 %SD 0.0| 0.0| 0.5| 1.6| 2.1| 0.5| 0.5| 0.5| 0.5| 0.0| 0.0| 0.5| 0.5| 0.4| 0.0| 0.0 256| 100| 14500.78| 21.99| 659.32| 290030| 290113| 93386788| 93396614| 0| 4| 290076| 290140| 295853| 1.00| 0.98 %SD 0.0| 0.0| 0.5| 1.4| 0.9| 0.5| 0.5| 0.5| 0.5| 0.0| 15.7| 0.5| 0.5| 0.7| 0.0| 0.0 512| 50| 14257.76| 23.48| 607.39| 285169| 285244| 164821878| 164832698| 0| 4| 285219| 285269| 291469| 1.00| 0.98 %SD 0.0| 0.0| 0.9| 1.6| 0.7| 0.9| 0.9| 0.9| 0.9| 0.0| 15.7| 0.9| 0.9| 0.9| 0.0| 0.0 512| 100| 14338.74| 22.66| 632.92| 286789| 286853| 165757982| 165765159| 0| 4| 286828| 286893| 292733| 1.00| 0.98 %SD 0.0| 0.0| 0.0| 0.1| 0.1| 0.0| 0.0| 0.0| 0.0| 0.0| 15.7| 0.0| 0.0| 0.1| 0.0| 0.0 Thu Dec 29 20:36:53 2011 ======================================================================================================================================================================== TCP_STREAM size|sessions|throughput| cpu|normalize| #tx-pkts| #rx-pkts| #tx-byts| #rx-byts|#re-trans|#tx-intr|#rx-intr| #io_exit| #irq_inj|#tpkt/#exit|#rpkt/#irq 1) 256| 1| 1308.58| 25.68| 610.36| 1144659| 2385825| 75548090| 3428969637| 0| 17| 1055042| 847930| 1073171| 1.35| 2.22 2) 256| 1| 1266.19| 50.80| 24.93| 1119642| 2307593| 73896989| 3317818482| 0| 16| 1012795| 774796| 1030026| 1.44| 2.24 % | +0.0| -3.2| +97.8| -95.9| -2.2| -3.3| -2.2| -3.2| +0.0| -5.9| -4.0| -8.6| -4.0| +6.7| +0.9 1) 256| 2| 2303.88| 75.86| 30.37| 751786| 3710773| 49625523| 6004979651| 0| 12| 761053| 237602| 807396| 3.17| 4.59 2) 256| 2| 2305.26| 75.81| 30.41| 754533| 3678855| 49804148| 6006610984| 0| 12| 788165| 254245| 835001| 2.98| 4.41 % | +0.0| +0.1| -0.1| +0.1| +0.4| -0.9| +0.4| +0.0| +0.0| +0.0| +3.6| +7.0| +3.4| -6.0| -3.9 1) 512| 1| 1597.22| 51.31| 31.12| 1344860| 2840991| 88761368| 4181982870| 0| 20| 933259| 691258| 951026| 1.94| 2.99 2) 512| 1| 1605.72| 51.13| 31.40| 1337269| 2851899| 88260371| 4202588460| 0| 20| 925052| 699349| 942828| 1.91| 3.02 % | +0.0| +0.5| -0.4| +0.9| -0.6| +0.4| -0.6| +0.5| +0.0| +0.0| -0.9| +1.2| -0.9| -1.5| +1.0 1) 512| 2| 4885.64| 69.81| 68.28| 1546820| 3311501| 102158968| 12433545874| 0| 27| 1036179| 649578| 1063091| 8.02| 2.97 2) 512| 2| 6122.82| 86.66| 70.66| 381147| 1442374| 25249126| 15405306185| 0| 8| 349795| 23027| 372068| 16.57| 3.87 % | +0.0| +25.3| +24.1| +3.5| -75.4| -56.4| -75.3| +23.9| +0.0| -70.4| -66.2| -96.5| -65.0| +106.6| +30.3 TCP_RR size|sessions|throughput| cpu|normalize| #tx-pkts| #rx-pkts| #tx-byts| #rx-byts|#re-trans|#tx-intr|#rx-intr| #io_exit| #irq_inj|#tpkt/#exit|#rpkt/#irq 1) 256| 50| 14433.24| 22.19| 650.52| 288679| 288765| 92951906| 92969020| 0| 4| 288733| 288781| 295057| 1.00| 0.98 2) 256| 50| 14515.94| 22.20| 653.98| 290333| 290423| 93484515| 93499043| 0| 4| 290387| 290436| 296923| 1.00| 0.98 % | +0.0| +0.6| +0.0| +0.5| +0.6| +0.6| +0.6| +0.6| +0.0| +0.0| +0.6| +0.6| +0.6| +0.0| +0.0 1) 256| 100| 14473.61| 22.01| 657.84| 289486| 289595| 93211760| 93224643| 0| 5| 289551| 289594| 295647| 1.00| 0.98 2) 256| 100| 14500.78| 21.99| 659.32| 290030| 290113| 93386788| 93396614| 0| 4| 290076| 290140| 295853| 1.00| 0.98 % | +0.0| +0.2| -0.1| +0.2| +0.2| +0.2| +0.2| +0.2| +0.0| -20.0| +0.2| +0.2| +0.1| +0.0| +0.0 1) 512| 50| 14399.08| 22.79| 631.82| 287996| 288063| 166455616| 166464572| 0| 4| 288036| 288100| 293729| 1.00| 0.98 2) 512| 50| 14257.76| 23.48| 607.39| 285169| 285244| 164821878| 164832698| 0| 4| 285219| 285269| 291469| 1.00| 0.98 % | +0.0| -1.0| +3.0| -3.9| -1.0| -1.0| -1.0| -1.0| +0.0| +0.0| -1.0| -1.0| -0.8| +0.0| +0.0 1) 512| 100| 14280.03| 22.11| 646.46| 285614| 285684| 165079121| 165087633| 0| 5| 285652| 285721| 291826| 1.00| 0.98 2) 512| 100| 14338.74| 22.66| 632.92| 286789| 286853| 165757982| 165765159| 0| 4| 286828| 286893| 292733| 1.00| 0.98 % | +0.0| +0.4| +2.5| -2.1| +0.4| +0.4| +0.4| +0.4| +0.0| -20.0| +0.4| +0.4| +0.3| +0.0| +0.0
你的输出结果是什么工具打出来的?自己的写脚本调用tcpdump吗?
LikeLike
先计算数字, 用 print 的格式字符串打印 比较原始
LikeLike