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