Skip to content

Linux CPU/MEM/IO benchmark tool sysbench

CPU性能测试

sysbench --test=cpu --cpu-max-prime=20000 \
         --num-threads=8 run

内存性能测试

sysbench --test=memory --num-threads=8 \
         --memory-block-size=8192 \
         --memory-total-size=2G run

磁盘I/O性能测试

sysbench --test=fileio --num-threads=8 --file-rw-ratio=5 \
         --file-total-size=500M --file-test-mode=rndrw prepare
sysbench --test=fileio --num-threads=8 --file-rw-ratio=5 \
         --file-total-size=500M --file-test-mode=rndrw run

Disclaimer
  1. License under CC BY-NC 4.0
  2. Copyright issue feedback me#imzye.me, replace # with @
  3. Not all the commands and scripts are tested in production environment, use at your own risk
  4. No privacy information is collected here
Try iOS App