测试软件:sysbench-memory

1、sysbench测试主机在内存中的连续读写速度
2、测试环境,虚拟机4线程、1G内存,PC服务器96线程、512G内存
虚拟机传输16G数据、块大小16K、线程数4

  1. root@pm1:/root# sysbench --test=memory --memory-block-size=16K --memory-total-size=16G --num-threads=4 run
  2. sysbench 0.5: multi-threaded system evaluation benchmark

  3. Running the test with following options:
  4. Number of threads: 4
  5. Random number generator seed is 0 and will be ignored


  6. Threads

  7. Operations performed: 1048576 (269059.42 ops/sec)

  8. 16384.00 MB transferred (4204.05 MB/sec)


  9. General statistics:
  10.     total time: 3.8972s
  11.     total number of events: 1048576
  12.     total time taken by event execution: 9.0149s
  13.     response time:
  14.          min: 0.00ms
  15.          avg: 0.01ms
  16.          max: 29.98ms
  17.          approx. 95 percentile: 0.01ms

  18. Threads fairness:
  19.     events (avg/stddev): 262144.0000/2079.32
  20.     execution time (avg/stddev): 2.2537/0.02
PC服务器传输16G、块大小16K、线程数96

  1. [root@ ~]# sysbench --test=memory --memory-block-size=16K --memory-total-size=16G --num-threads=96 run
  2. sysbench 0.5: multi-threaded system evaluation benchmark

  3. Running the test with following options:
  4. Number of threads: 96
  5. Random number generator seed is 0 and will be ignored


  6. Threads

  7. Operations performed: 1048576 (405615.58 ops/sec)

  8. 16384.00 MB transferred (6337.74 MB/sec)


  9. General statistics:
  10.     total time: 2.5851s
  11.     total number of events: 1048576
  12.     total time taken by event execution: 47.7844s
  13.     response time:
  14.          min: 0.00ms
  15.          avg: 0.05ms
  16.          max: 8.60ms
  17.          approx. 95 percentile: 0.08ms

  18. Threads fairness:
  19.     events (avg/stddev): 10922.6667/408.97
  20.     execution time (avg/stddev): 0.4978/0.02
看来多线程在内存中的调度还是很大优势的,如果把PC服务器换成4线程,其实和虚拟机性能差不多。

  1. [root@ ~]# sysbench --test=memory --memory-block-size=16K --memory-total-size=16G --num-threads=4 run
  2. sysbench 0.5: multi-threaded system evaluation benchmark

  3. Running the test with following options:
  4. Number of threads: 4
  5. Random number generator seed is 0 and will be ignored


  6. Threads

  7. Operations performed: 1048576 (271394.71 ops/sec)

  8. 16384.00 MB transferred (4240.54 MB/sec)


  9. General statistics:
  10.     total time: 3.8637s
  11.     total number of events: 1048576
  12.     total time taken by event execution: 13.2885s
  13.     response time:
  14.          min: 0.00ms
  15.          avg: 0.01ms
  16.          max: 0.19ms
  17.          approx. 95 percentile: 0.04ms

  18. Threads fairness:
  19.     events (avg/stddev): 262144.0000/11704.01
  20.     execution time (avg/stddev): 3.3221/0.03

  21. You have new mail in /var/spool/mail/root
上面是把PC服务器的线程数改成4之后,每秒传输4240M,跟之前虚拟机的传输差不多,但是在最大响应时间差别比较大。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12219480/viewspace-1745306/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/12219480/viewspace-1745306/

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值