NAME
sysbench - multi-threaded benchmark tool for database systems

SYNOPSIS
sysbench [common-options] --test=name [test-options] <command>

Commands: prepare run cleanup help version

DESCRIPTION
SysBench is a modular, cross-platform and multi-threaded benchmark tool for evaluating OS parameters that are important for a system running a database under intensive load.

The idea of this benchmark suite is to quickly get an impression about system performance without setting up complex database benchmarks or even without installing a database at all.

The design is very simple. SysBench runs a specified number of threads and they all execute requests in parallel. The actual workload produced by requests depends on the specified test mode. You can limit either the total number of requests or the total time for the benchmark, or both.

Compiled-in database drivers:
* mysql - MySQL driver
* pgsql - PostgreSQL driver

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

Available test modes are implemented by compiled-in modules, and SysBench was designed to make adding new test modes an easy task. Each test mode may have additional (or workload-specific) options.

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
  
PSEUDO-RANDOM NUMBERS GENERATOR OPTIONS
  --rand-type=STRING   random numbers distribution {uniform, gaussian, special, pareto, zipfian} to use by default [special]
  --rand-seed=N        seed for random number generator. When 0, the current time is used as an RNG seed. [0]
  --rand-spec-iter=N   number of iterations for the special distribution [12]
  --rand-spec-pct=N    percentage of the entire range where 'special' values will fall in the special distribution [1]
  --rand-spec-res=N    percentage of 'special' values to use for the special distribution [75]
  --rand-pareto-h=N    shape parameter for the Pareto distribution [0.2]
  --rand-zipfian-exp=N shape parameter (exponent, theta) for the Zipfian distribution [0.8]
  
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]

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-table-engine=STRING  storage engine to use for the test table {myisam,innodb,bdb,heap,ndbcluster,federated} [innodb]
  --mysql-engine-trx=STRING    whether storage engine used is transactional or not {yes,no,auto} [auto]
  --mysql-ssl=[on|off]         use SSL connections, if available in the client library [off]
  --mysql-compression=[on|off] use compression, if available in the client library [off]
  --myisam-max-rows=N          max-rows parameter for MyISAM tables [1000000]
  --mysql-debug=[on|off]       dump 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, pretent 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]

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=STRING     additional flags to use on opening 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]


CPU OPTIONS
  --cpu-max-prime=N      upper limit for primes generator [10000]

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]

THREAD OPTIONS
  --thread-yields=N      number of yields to do per request [1000]
  --thread-locks=N       number of locks per thread [8]

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 inside mutex lock [10000]

SEE ALSO
Upstream provided html-formatted manual, describing the features of sysbench: /usr/share/doc/sysbench/manual.html
