Linux command(sysbench)

文章介绍了如何使用Sysbench进行CPU、内存、文件I/O和MySQLOLTP的测试。它提供了几个基本的命令示例,包括设置最大素数、内存块大小、文件总大小等参数。Sysbench是一个多用途的系统基准和压力测试工具,可用于评估不同系统组件的性能。
摘要由CSDN通过智能技术生成

Simply put

  1. CPU test:
    sysbench --test=cpu --cpu-max-prime=20000 run
    This command will run a CPU stress test with a maximum prime number of 20000.

  2. Memory test:
    sysbench --test=memory --memory-block-size=1M --memory-total-size=10G run
    This command will run a memory benchmark with a block size of 1MB and a total size of 10GB.

  3. File I/O test:
    sysbench --test=fileio --file-total-size=10G prepare
    sysbench --test=fileio --file-total-size=10G --file-test-mode=rndrw run
    sysbench --test=fileio --file-total-size=10G cleanup
    These commands will prepare, run, and cleanup a file I/O benchmark with a total file size of 10GB and a random read/write test mode.

  4. MySQL OLTP test:
    sysbench --test=oltp --mysql-db=test --mysql-user=root --mysql-password=password prepare
    sysbench --test=oltp --mysql-db=test --mysql-user=root --mysql-password=password --max-time=60 --max-requests=1000000 --num-threads=8 run
    sysbench --test=oltp --mysql-db=test --mysql-user=root --mysql-password=password cleanup
    These commands will prepare, run, and cleanup a MySQL OLTP benchmark with a test database named “test”, using the root user with the password “password”, running for a maximum of 60 seconds with 8 threads and a maximum of 1 million requests.

Note that these are just a few examples of commonly used commands for Sysbench 0.4.12. The tool has many more options and parameters that can be used for testing various system components. You can refer to the official documentation for more information on how to use Sysbench.

GITHUB

https://github.com/akopytov/sysbench

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

P("Struggler") ?

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值