【SysBench】sysbench-1.20 命令速查表

1、通用语法

The general command line syntax for sysbench is:

	  sysbench [options]... [testname] [command] 
  • testname is an optional name of a built-in test (e.g. fileio,
    memory, cpu, etc.), or a name of one of the bundled Lua scripts
    (e.g. oltp_read_only), or a path to a custom Lua script. If no
    test name is specified on the command line (and thus, there is no
    command too, as in that case it would be parsed as a testname), or
    the test name is a dash (“-”), then sysbench expects a Lua script to
    execute on its standard input.

  • command is an optional argument that will be passed by sysbench to
    the built-in test or script specified with testname. command
    defines the action that must be performed by the test. The list of
    available commands depends on a particular test. Some tests also
    implement their own custom commands.

    Below is a description of typical test commands and their purpose:

    • prepare: performs preparative actions for those tests which need
      them, e.g. creating the necessary files on disk for the fileio
      test, or filling the test database for database benchmarks.
    • run: runs the actual test specified with the testname
      argument. This command is provided by all tests.
    • cleanup: removes temporary data after the test run in those
      tests which create one.
    • help: displays usage information for the test specified with the
      testname argument. This includes the full list of commands
      provided by the test, so it should be used to get the available
      commands.
  • options is a list of zero or more command line options starting with
    '--'. As with commands, the sysbench testname help command
    should be used to describe available options provided by a
    particular test.

You can use sysbench --help to display the general command line syntax
and options.

2、通用命令行选项

$ sysbench --help
Usage:sysbench [options]... [testname] [command]Commands implemented by most tests: prepare run cleanup helpGeneral options:--threads=N                     number of threads to use [1]--events=N                      limit for total number of events [0]--time=N                        limit for total execution time in seconds [10]--forced-shutdown=STRING        number of seconds to wait after the --time limit before forcing shutdown, or 'off' to disable [off]--thread-stack-size=SIZE        size of stack per thread [64K]--rate=N                        average transactions rate. 0 for unlimited rate [0]--report-interval=N             periodically report intermediate statistics with a specified interval in seconds. 0 disables intermediate reports [0]--report-checkpoints=[LIST,...] dump full statistics and reset all counters at specified points in time. The argument is a list of comma-separated values representing the amount of time in seconds elapsed from start of test when report checkpoint(s) must be performed. Report checkpoints are off by default. []--debug[=on|off]                print more debugging info [off]--validate[=on|off]             perform validation checks where possible [off]--help[=on|off]                 print help and exit [off]--version[=on|off]              print version and exit [off]--config-file=FILENAME          File containing command line options--tx-rate=N                     deprecated alias for --rate [0]--max-requests=N                deprecated alias for --events [0]--max-time=N                    deprecated alias for --time [0]--num-threads=N                 deprecated alias for --threads [1]Pseudo-Random Numbers Generator options:--rand-type=STRING random numbers distribution {uniform,gaussian,special,pareto} [special]--rand-spec-iter=N number of iterations used for numbers generation [12]--rand-spec-pct=N  percentage of values to be treated as 'special' (for special distribution) [1]--rand-spec-res=N  percentage of 'special' values to use (for special distribution) [75]--rand-seed=N      seed for random number generator. When 0, the current time is used as a RNG seed. [0]--rand-pareto-h=N  parameter h for pareto distribution [0.2]Log options:--verbosity=N verbosity level {5 - debug, 0 - only critical messages} [3]--percentile=N       percentile to calculate in latency statistics (1-100). Use the special value of 0 to disable percentile calculations [95]--histogram[=on|off] print latency histogram in report [off]General database options:--db-driver=STRING  specifies database driver to use ('help' to get list of available drivers) [mysql]--db-ps-mode=STRING prepared statements usage mode {auto, disable} [auto]--db-debug[=on|off] print database-specific debug information [off]Compiled-in database drivers:mysql - MySQL driverpgsql - PostgreSQL drivermysql options:--mysql-host=[LIST,...]          MySQL server host [localhost]--mysql-port=[LIST,...]          MySQL server port [3306]--mysql-socket=[LIST,...]        MySQL socket--mysql-user=STRING              MySQL user [sbtest]--mysql-password=STRING          MySQL password []--mysql-db=STRING                MySQL database name [sbtest]--mysql-ssl[=on|off]             use SSL connections, if available in the client library [off]--mysql-ssl-cipher=STRING        use specific cipher for SSL connections []--mysql-compression[=on|off]     use compression, if available in the client library [off]--mysql-debug[=on|off]           trace all client library calls [off]--mysql-ignore-errors=[LIST,...] list of errors to ignore, or "all" [1213,1020,1205]--mysql-dry-run[=on|off]         Dry run, pretend that all MySQL client API calls are successful without executing them [off]pgsql options:--pgsql-host=STRING     PostgreSQL server host [localhost]--pgsql-port=N          PostgreSQL server port [5432]--pgsql-user=STRING     PostgreSQL user [sbtest]--pgsql-password=STRING PostgreSQL password []--pgsql-db=STRING       PostgreSQL database name [sbtest]Compiled-in tests:fileio - File I/O testcpu - CPU performance testmemory - Memory functions speed testthreads - Threads subsystem performance testmutex - Mutex performance testSee 'sysbench <testname> help' for a list of options for each test.

以下为 sysbench 编译时内置的测试模块,包括 CPU、文件 I/O、内存、线程、互斥(Mutex)。

2、CPU

$ sysbench cpu help
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)cpu options:--cpu-max-prime=N upper limit for primes generator [10000]

3、文件 I/O

$ sysbench fileio help
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)fileio options:--file-num=N                  number of files to create [128]--file-block-size=N           block size to use in all IO operations [16384]--file-total-size=SIZE        total size of files to create [2G]--file-test-mode=STRING       test mode {seqwr, seqrewr, seqrd, rndrd, rndwr, rndrw}--file-io-mode=STRING         file operations mode {sync,async,mmap} [sync]--file-async-backlog=N        number of asynchronous operatons to queue per thread [128]--file-extra-flags=[LIST,...] list of additional flags to use to open files {sync,dsync,direct} []--file-fsync-freq=N           do fsync() after this number of requests (0 - don't use fsync()) [100]--file-fsync-all[=on|off]     do fsync() after each write operation [off]--file-fsync-end[=on|off]     do fsync() at the end of test [on]--file-fsync-mode=STRING      which method to use for synchronization {fsync, fdatasync} [fsync]--file-merged-requests=N      merge at most this number of IO requests if possible (0 - don't merge) [0]--file-rw-ratio=N             reads/writes ratio for combined test [1.5]

4、内存

$ sysbench memory help
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)memory options:--memory-block-size=SIZE    size of memory block for test [1K]--memory-total-size=SIZE    total size of data to transfer [100G]--memory-scope=STRING       memory access scope {global,local} [global]--memory-hugetlb[=on|off]   allocate memory from HugeTLB pool [off]--memory-oper=STRING        type of memory operations {read, write, none} [write]--memory-access-mode=STRING memory access mode {seq,rnd} [seq]

5、线程

$ sysbench threads help
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)threads options:--thread-yields=N number of yields to do per request [1000]--thread-locks=N  number of locks per thread [8]

6、互斥(Mutex)

$ sysbench mutex help
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)mutex options:--mutex-num=N   total size of mutex array [4096]--mutex-locks=N number of mutex locks to do per thread [50000]--mutex-loops=N number of empty loops to do outside mutex lock [10000]

7、OLTP 数据库基准测试 Lua 脚本

$ ls -1 /usr/local/share/sysbench
bulk_insert.lua
oltp_common.lua
oltp_delete.lua
oltp_insert.lua
oltp_point_select.lua
oltp_read_only.lua
oltp_read_write.lua
oltp_update_index.lua
oltp_update_non_index.lua
oltp_write_only.lua
select_random_points.lua
select_random_ranges.lua

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/753574.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

ChatGPT提示词方法的原理

关于提示词&#xff0c;我之前的一些文章可以参考&#xff1a; 【AIGC】AI作图最全提示词prompt集合&#xff08;收藏级&#xff09;https://giszz.blog.csdn.net/article/details/134815245?ydrefereraHR0cHM6Ly9tcC5jc2RuLm5ldC9tcF9ibG9nL21hbmFnZS9hcnRpY2xlP3NwbT0xMDExL…

力扣● 583. 两个字符串的删除操作 ● 72. 编辑距离 ● 编辑距离总结篇

● 583. 两个字符串的删除操作 注意审题&#xff1a; 给定两个单词 word1 和 word2 &#xff0c;返回使得 word1 和 word2 相同所需的最小步数。 每步 可以删除任意一个字符串中的一个字符。 删除最少的字符使两者相同&#xff0c;说明留下来的就是最大公共子序列。不要求…

探索大数据时代的决策利器:如何有效应对海量数据?

随着信息技术的快速发展,大数据时代已经到来,海量数据成为了我们生活和工作中不可忽视的一部分。这些数据来自各个方面:社交媒体、传感器、网络交易、移动设备等,每天都在以惊人的速度增长。但是,面对如此庞大的数据量,我们该如何有效地应对呢?本文将探索大数据时代的决…

13 秒插入 30 万条数据,这才是 Java 批量插入正确的姿势!

本文主要讲述通过MyBatis、JDBC等做大数据量数据插入的案例和结果。 30万条数据插入插入数据库验证 实体类、mapper和配置文件定义 User实体 mapper接口 mapper.xml文件 jdbc.properties sqlMapConfig.xml 不分批次直接梭哈 循环逐条插入 MyBatis实现插入30万条数据 J…

代码资源集合

代码资源 通信QPSKOQPSKMSK信道编码GMSK 雷达LFM及干扰技术LFM射频噪声干扰噪声调幅干扰噪声调频干扰噪声调相干扰固定移频干扰间歇采样干扰 SAR成像RD算法CS算法wk算法 SAR干扰技术射频噪声干扰调幅噪声干扰调频噪声干扰调相噪声干扰噪声卷积干扰乘积干扰移频干扰 DOA估计功率…

Linux:vim详解及使用

一、什么是vim vim的三种模式(其实有好多模式&#xff0c;目前掌握这3种即可),分别是命令模式&#xff08;command mode&#xff09;、插 入模式&#xff08;Insert mode&#xff09;和底行模式&#xff08;last line mode&#xff09;&#xff0c;各模式的功能区分如下&#…

电学基础知识

目录 电流 前言 电流的产生 电流的单位安培&#xff08;A&#xff09; 电路和电池 开路和闭路 电灯泡原理 对电池容量的理解 毫安时 毫瓦时 直流电和交流电 AC交流电 DC直流电 直流电和交流电对比 电压 对电器的电压和电流的理解 电阻 电压电阻电子的关系 欧…

python--剑指offer--中等--07. 重建二叉树

输入某二叉树的前序遍历和中序遍历的结果&#xff0c;请重建该二叉树。假设输入的前序遍历和中序遍历的结果中都不含重复的数字。 例如&#xff0c;给出 前序遍历 preorder [3,9,20,15,7] 中序遍历 inorder [9,3,15,20,7] 返回如下的二叉树&#xff1a; 3/ 9 20 / 15 7 …

手把手带你入门学习TensorFlow

1. TensorFlow的来源及原理 TensorFlow是由Google Brain团队开发的开源深度学习框架&#xff0c;于2015年首次发布。它是一个功能强大、灵活且易于使用的工具&#xff0c;被广泛应用于机器学习和深度学习领域。TensorFlow的设计理念是通过构建计算图来表示复杂的数学运算和神经…

47.全排列II

// 定义一个Solution类&#xff0c;用于解决给定不重复整数数组的全排列问题 class Solution {// 初始化结果集&#xff0c;用于存放所有不重复的全排列组合List<List<Integer>> result new ArrayList<>();// 初始化路径变量&#xff0c;用于暂存当前递归生…

Vulnhub靶机:Kioptrix_Level1.3

一、介绍 运行环境&#xff1a;Virtualbox 攻击机&#xff1a;kali&#xff08;192.168.56.101&#xff09; 靶机&#xff1a;Kioptrix_Level1.3&#xff08;192.168.56.109&#xff09; 目标&#xff1a;获取靶机root权限和flag 靶机下载地址&#xff1a;https://www.vul…

Springboot自动校验@NotBlank@NotNull@NotEmpty

1、依赖问题&#xff1a; 查看搭建的SpringBoot项目中 NotEmpty 是否可以引用&#xff0c;查询资料发现从SpringBoot 2.3.0之后放弃了默认对javax.validation 的支持。 <dependency> <groupId>org.springframework.boot</groupId> …

2024.3.18

1、试编程 封装一个动物的基类&#xff0c;类中有私有成员:姓名&#xff0c;颜色&#xff0c;指针成员年纪再封装一个狗这样类&#xff0c;共有继承于动物类&#xff0c;自己拓展的私有成员有:指针成员:腿的个数(整型intcount)&#xff0c;共有成员函数:会叫:void speak() 要求…

yocto系列之针对tarball编写recipes

回顾 针对借助yocto构建linux 镜像我们已经讲述了6部分&#xff0c; 简单回顾如下&#xff1a; Yocto: 第1部分 - yocto系列之yocto是个什么东东 https://mp.csdn.net/mp_blog/creation/editor/136742286 Yocto: 第2部分 - yocto系列之配置ubuntu主机 https://mp.csdn.net…

PHP修改默认上传文件缓存位置

php默认保存文件上传缓存的位置是 /tmp 版本小于php5.5 修改php.ini中**upload_tmp_dir ** upload_tmp_dir "/tmp/file" 版本大于和等于php5.5 修改php.ini中**sys_temp_dir ** sys_temp_dir "/tmp/file"谢谢大家观看&#xff0c;我们下次见

管理类联考–复试–英文面试–问题--规划介绍原因做法--汇总

文章目录 规划介绍原因做法 规划 一、提问方式&#xff1a;问题1&#xff1a;读研的规划&#xff1b;问题2&#xff1a;未来五年的规划&#xff1b;问题3&#xff1a;是否计划读博 常见问法1&#xff1a;Can you talk about your plans in the postgraduate period&#xff1f…

弗洛伊德-华沙算法求任意两点之间的最短路径算法

对于弗洛伊德-华沙算法首先是要假设研究的图中是不包含有负边的&#xff0c;对于所给的图中的任意亮点v1&#xff0c;vm&#xff0c;假设两点之间存在一条连通路径&#xff0c;对于该路径中去掉头和尾节点&#xff0c;也就是v1&#xff0c;vm&#xff0c;剩下的节点也就称之为这…

JNDI注入原理及利用IDEA漏洞复现

&#x1f36c; 博主介绍&#x1f468;‍&#x1f393; 博主介绍&#xff1a;大家好&#xff0c;我是 hacker-routing &#xff0c;很高兴认识大家~ ✨主攻领域&#xff1a;【渗透领域】【应急响应】 【Java、PHP】 【VulnHub靶场复现】【面试分析】 &#x1f389;点赞➕评论➕收…

王道c语言-100元有几种换法

Description 一张面值100元的人民币换成10元、5元、2元和1元面值的票子。要求换正好40张&#xff0c;且每种票子至少一张。问&#xff1a;有几种换法&#xff1f; #include <stdio.h> int main() {int count 0;int i, j, t, k, ret 0;for (i 1; i < 37; i) {for …

自定义全能搜索HTML源码

基础功能 可自定义通过筛选搜索&#xff0c;内容结果以嵌入方式展示&#xff0c;并不会直接跳转该地址显示&#xff0c;将以内嵌页面形式浏览&#xff0c;可自行添加其他地址搜索&#xff01;也可以做搜索引导页等等&#xff01; 界面布局&#xff1b; 源码为自适应端&#…