`
gaojingsong
  • 浏览: 1181996 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

【性能测试工具sysbench】

阅读更多

sysbench是一款开源的多线程性能测试工具,可以执行CPU/内存/线程/IO/数据库等方面的性能测试。

 

数据库目前支持MySQL/Oracle/PostgreSQL。本文只是简单演示一下几种测试的用法,后续准备利用sysbench来对MySQL进行一系列的测试。具体的一些参数设置,需要根据不同的测试要求来进行调整。

 

 

sysbench是一个开源的、模块化的、跨平台的多线程性能测试工具,可以用来进行CPU、内存、磁盘I/O、线程、数据库的性能测试。目前支持的数据库有MySQL、Oracle和PostgreSQL。当前功能允许测试的系统参数有:

file I/O performance (文件I / O性能)

scheduler performance (调度性能)

memory allocation and transfer speed (内存分配和传输速度)

POSIX threads implementation performance (POSIX线程执行绩效)

database server performance (OLTP benchmark) (数据库服务器性能)

 

 

 

sysbench支持以下几种测试模式:

1、CPU运算性能

2、磁盘IO性能

3、调度程序性能

4、内存分配及传输速度

5、POSIX线程性能

6、数据库性能(OLTP基准测试)

目前sysbench主要支持 mysql,drizzle,pgsql,oracle 等几种数据库。

 

 

 

sysbench [general-options]... --test=<test-name> [test-options]... command

General options: #通用选项

  --num-threads=N            number of threads to use [1] #创建测试线程的数目。默认为1.

  --max-requests=N           limit for total number of requests [10000] #请求的最大数目。默认为10000,0代表不限制。

  --max-time=N               limit for total execution time in seconds [0] #最大执行时间,单位是s。默认是0,不限制。

  --forced-shutdown=STRING   amount of time to wait after --max-time before forcing shutdown [off] #超过max-time强制中断。默认是off。

  --thread-stack-size=SIZE   size of stack per thread [32K] #每个线程的堆栈大小。默认是32K。

  --init-rng=[on|off]        initialize random number generator [off] #在测试开始时是否初始化随机数发生器。默认是off。

  --test=STRING              test to run #指定测试项目名称。

  --debug=[on|off]           print more debugging info [off] #是否显示更多的调试信息。默认是off。

  --validate=[on|off]        perform validation checks where possible [off] #在可能情况下执行验证检查。默认是off。

  --help=[on|off]            print help and exit #帮助信息。

  --version=[on|off]         print version and exit #版本信息。

 

 

 

Usage:

  sysbench [options]... [testname] [command]

 

Commands implemented by most tests: prepare run cleanup help

 

General 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]

  --warmup-time=N                 execute events for this many seconds with statistics disabled before the actual benchmark run with statistics enabled [0]

  --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]

  --thread-init-timeout=N         wait time in seconds for worker threads to initialize [30]

  --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

  --luajit-cmd=STRING             perform LuaJIT control command. This option is equivalent to 'luajit -j'. See LuaJIT documentation for more information

  --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)

  --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 driver

 

mysql 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]

 

Compiled-in tests:

  fileio - File I/O test

  cpu - CPU performance test

  memory - Memory functions speed test

  threads - Threads subsystem performance test

  mutex - Mutex performance test

 

See 'sysbench <testname> help' for a list of options for each test.

0
0
分享到:
评论

相关推荐

    MySQL 性能测试工具sysbench安装使用

    ### MySQL 性能测试工具sysbench安装与使用详解 #### 一、Sysbench简介 Sysbench是一款开源的、跨平台的、多线程基准测试工具,用于评估不同系统配置下的数据库负载性能。它支持多种测试模式,包括但不限于CPU运算...

    性能测试工具sysbench简介

    性能测试工具sysbench简介.您现在的位置:首页--&gt;Oracle--&gt;性能测试工具sysbench简介性能测试工具sysbench简介出处信息sysbench是一款开源的多线程性能测试工具,可以执行CPU/内存/线程/IO/数据库等方面的性能...

    数据库经典压测工具sysbench双版本 sysbench0.5支持oracle sysbench1.1 支持达梦 附详细文档

    总的来说,sysbench作为一个强大的数据库性能测试工具,能够帮助我们深入了解数据库在各种工作负载下的表现。sysbench0.5和sysbench1.1的双版本设计,不仅覆盖了传统的Oracle数据库,还拓展到了中国本土的达梦数据库...

    性能测试:sysbench

    mysql性能测试工具:sysbench+资源(autoconf、automake、libtool)

    06-MySQL压力测试工具sysbench1

    MySQL 压力测试工具 sysbench 介绍 sysbench 是一个模块化的、跨平台、多线程基准测试工具,主要用于评估测试各种不同系统参数下的数据库负载情况。目前 sysbench 主要支持 MySQL, pgsql, oracle 这 3 种数据库。 ...

    mysql性能测试工具

    mysql 性能测试工具sysbench 0.4.12.10版本

    性能测试工具-sysbench.html

    linux性能测试工具-sysbench使用方法,可以mysql读写性能

    性能测试sysbench.rar

    Sysbench是一款开源的多线程性能测试工具,广泛用于评估Linux系统的CPU、内存、I/O等子系统的性能。本文将详细介绍sysbench-1.0.18的下载、安装过程,以及如何编写和执行测试脚本来进行性能评估。 首先,我们需要...

    详解MySQL基准测试和sysbench工具.doc

    数据库的基准测试是对数据库的性能指标进行定量的、可复现的、可对比的测试。基准测试与压力测试 基准测试可以理解为针对系统的一种压力测试。但基准测试不关心业务逻辑,更加简单、直接、易于测试,数据可以由工具...

    mysql-sysbench测试

    sysbench是一个开源的基准测试工具,可以模拟不同的负载场景来测试数据库的性能。 sysbench下载链接:https://github.com/akopytov/sysbench 安装sysbench: 1. 上传sysbench安装包到Linux环境 2. 解压安装包tar ...

    sysbench进行cpu,磁盘IO,内存,OLTP基准测试

    sysbench进行cpu,磁盘IO,内存,OLTP基准测试, 一sysbench-05安装 二用法下面的测试案例需要用到这些说明才能看的懂的 三开始测试 cpu性能测试 线程测试 磁盘IO性能测试 内存测试 OLTP测试

    数据库性能测试之sysbench工具的安装与用法详解

    sysbench是用于多线程性能测试的开源工具,它具有模块化和跨平台的特性,能够测试CPU、内存、磁盘I/O、线程以及数据库的性能。在数据库测试方面,sysbench支持MySQL、Oracle和PostgreSQL这三种常见的关系型数据库...

    sysbench-0.4.12

    sysbench是一款开源的、跨平台的系统性能测试工具,广泛用于评估Linux系统的CPU、内存、磁盘I/O以及数据库等组件的性能。sysbench-0.4.12是其在2012年发布的一个版本,它提供了丰富的测试场景和参数,使得用户能够...

    Android版本的sysbench工具

    sysbench是一个模块化、跨平台、多线程基准测试工具,主要用于测试不同系统参数下的数据库负载情况,本文主要介绍0.4版本的使用。sysbench主要用于以下性能测试: 文件I/O性能 调度 内存分配和传输 POSIX线程 ...

    sysbench压测工具

    `sysbench`是一个强大的系统性能测试工具,无论是对于数据库管理员还是系统管理员,都是评估和优化系统性能的重要助手。通过深入理解和熟练使用`sysbench`,我们可以更有效地找出系统潜在的问题,提升整体性能,确保...

    sysbench-master.zip

    sysbench是一款强大的多线程性能基准测试工具,主要应用于数据库系统、操作系统以及CPU性能的评估。它由Alexey Kopytov开发,并在GitHub上开源,链接为&lt;https://github.com/akopytov/sysbench&gt;。sysbench的最新版本...

    统一开发环境mysql5.7.11基准测试文档_基于sysbench测试工具

    - **Sysbench工具简介**:Sysbench是一款专门用于测试MySQL等关系型数据库性能的工具,由多位MySQL专家推荐。它需要编译安装,并通过设置不同的参数来获取关于CPU计算能力、文件I/O能力、OLTP能力等多种性能指标的...

    sysbench-1.0.19.zip

    sysbench是一个多线程、多事件驱动的性能测试和基准测试工具,主要用于评估和比较数据库系统的性能。在这个sysbench-1.0.19.zip压缩包中,包含的是sysbench的源代码,为用户提供了一种强大的方式来测试MySQL数据库的...

Global site tag (gtag.js) - Google Analytics