.\" Text automatically generated by txt2man .TH SYSBENCH 1 "26 March 2024" "" "Benchmark tool for database systems" .SH NAME \fBsysbench \fP- multi-threaded benchmark tool for database systems \fB .SH SYNOPSIS .nf .fam C \fBsysbench\fP [\fIcommon-options\fP] \fB--test\fP=name [\fItest-options\fP] Commands: \fIprepare\fP \fIrun\fP \fIcleanup\fP \fIhelp\fP \fIversion\fP .fam T .fi .fam T .fi .SH 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. .PP 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. .PP 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. .PP Compiled-in database drivers: .IP \(bu 3 mysql - MySQL driver .IP \(bu 3 pgsql - PostgreSQL driver .PP Compiled-in tests: .IP \(bu 3 fileio - File I/O test .IP \(bu 3 cpu - CPU performance test .IP \(bu 3 memory - Memory functions speed test .IP \(bu 3 threads - Threads subsystem performance test .IP \(bu 3 mutex - Mutex performance test .PP 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. .SH GENERAL OPTIONS .TP .B \fB--threads\fP=N number of threads to use [1] .TP .B \fB--events\fP=N limit for total number of events [0] .TP .B \fB--time\fP=N limit for total execution time in seconds [10] .TP .B \fB--forced-shutdown\fP=STRING number of seconds to wait after the \fB--time\fP limit before forcing shutdown, or 'off' to disable [off] .TP .B \fB--thread-stack-size\fP=SIZE size of stack per thread [64K] .TP .B \fB--rate\fP=N average transactions rate. 0 for unlimited rate [0] .TP .B \fB--report-interval\fP=N periodically report intermediate statistics with a specified interval in seconds. 0 disables intermediate reports [0] \fB--report-checkpoints\fP=[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 \fBcheckpoint\fP(s) must be performed. Report checkpoints are off by default. [] .TP .B \fB--debug\fP[=on|off] print more debugging info [off] .TP .B \fB--validate\fP[=on|off] perform validation checks where possible [off] .TP .B --\fIhelp\fP[=on|off] print \fIhelp\fP and exit [off] .TP .B --\fIversion\fP[=on|off] print \fIversion\fP and exit [off] .TP .B \fB--config-file\fP=FILENAME File containing command line options .TP .B \fB--tx-rate\fP=N deprecated alias for \fB--rate\fP [0] .TP .B \fB--max-requests\fP=N deprecated alias for \fB--events\fP [0] .TP .B \fB--max-time\fP=N deprecated alias for \fB--time\fP [0] .TP .B \fB--num-threads\fP=N deprecated alias for \fB--threads\fP [1] .SH PSEUDO-RANDOM NUMBERS GENERATOR OPTIONS .TP .B \fB--rand-type\fP=STRING random numbers distribution {uniform,gaussian,pareto} [special] .TP .B \fB--rand-seed\fP=N seed for random number generator. When 0, the current time is used as a RNG seed. [0] .TP .B \fB--rand-pareto-h\fP=N parameter h for pareto distribution [0.2] .TP .B \fB--rand-zipfian-exp\fP=N shape parameter (exponent, theta) for the Zipfian distribution [0.8] .SH LOG OPTIONS .TP .B \fB--verbosity\fP=N verbosity level {5 - debug, 0 - only critical messages} [3] .TP .B \fB--percentile\fP=N percentile to calculate in latency statistics (1-100). Use the special value of 0 to disable percentile calculations [95] .TP .B \fB--histogram\fP[=on|off] print latency histogram in report [off] .SH GENERAL DATABASE OPTIONS .TP .B \fB--db-driver\fP=STRING specifies database driver to use ('\fIhelp\fP' to get list of available drivers) [mysql] .TP .B \fB--db-ps-mode\fP=STRING prepared statements usage mode {auto, disable} [auto] .TP .B \fB--db-debug\fP[=on|off] print database-specific debug information [off] .SH MYSQL OPTIONS .TP .B \fB--mysql-host\fP=[LIST,\.\.\.] MySQL server host [localhost] .TP .B \fB--mysql-port\fP=[LIST,\.\.\.] MySQL server port [3306] .TP .B \fB--mysql-socket\fP=[LIST,\.\.\.] MySQL socket .TP .B \fB--mysql-user\fP=STRING MySQL user [sbtest] .TP .B \fB--mysql-password\fP=STRING MySQL password [] .TP .B \fB--mysql-db\fP=STRING MySQL database name [sbtest] .TP .B \fB--mysql-ssl\fP[=on|off] use SSL connections, if available in the client library [off] .TP .B \fB--mysql-ssl-cipher\fP=STRING use specific cipher for SSL connections [] .TP .B \fB--mysql-compression\fP[=on|off] use compression, if available in the client library [off] .TP .B \fB--mysql-debug\fP[=on|off] trace all client library calls [off] \fB--mysql-ignore-errors\fP=[LIST,\.\.\.] list of errors to ignore, or "all" [1213,1020,1205] .TP .B \fB--mysql-dry\fP-\fIrun\fP[=on|off] Dry \fIrun\fP, pretend that all MySQL client API calls are successful without executing them [off] .SH PGSQL OPTIONS .TP .B \fB--pgsql-host\fP=STRING PostgreSQL server host [localhost] .TP .B \fB--pgsql-port\fP=N PostgreSQL server port [5432] .TP .B \fB--pgsql-user\fP=STRING PostgreSQL user [sbtest] \fB--pgsql-password\fP=STRING PostgreSQL password [] .TP .B \fB--pgsql-db\fP=STRING PostgreSQL database name [sbtest] .SH FILEIO OPTIONS .TP .B \fB--file-num\fP=N number of files to create [128] .TP .B \fB--file-block-size\fP=N block size to use in all IO operations [16384] .TP .B \fB--file-total-size\fP=SIZE total size of files to create [2G] .TP .B \fB--file-test-mode\fP=STRING test mode {seqwr, seqrewr, seqrd, rndrd, rndwr, rndrw} .TP .B \fB--file-io-mode\fP=STRING file operations mode {sync,async,mmap} [sync] .TP .B \fB--file-async-backlog\fP=N number of asynchronous operatons to queue per thread [128] \fB--file-extra-flags\fP=[LIST,\.\.\.] list of additional flags to use to open files {sync,dsync,direct} [] .TP .B \fB--file-fsync-freq\fP=N do \fBfsync\fP() after this number of requests (0 - don't use \fBfsync\fP()) [100] .TP .B \fB--file-fsync-all\fP[=on|off] do \fBfsync\fP() after each write operation [off] .TP .B \fB--file-fsync-end\fP[=on|off] do \fBfsync\fP() at the end of test [on] .TP .B \fB--file-fsync-mode\fP=STRING which method to use for synchronization {fsync, fdatasync} [fsync] .TP .B \fB--file-merged-requests\fP=N merge at most this number of IO requests if possible (0 - don't merge) [0] .TP .B \fB--file-rw-ratio\fP=N reads/writes ratio for combined test [1.5] .SH CPU OPTIONS \fB--cpu-max-prime\fP=N upper limit for primes generator [10000] .SH MEMORY OPTIONS .TP .B \fB--memory-block-size\fP=SIZE size of memory block for test [1K] .TP .B \fB--memory-total-size\fP=SIZE total size of data to transfer [100G] .TP .B \fB--memory-scope\fP=STRING memory access scope {global,local} [global] .TP .B \fB--memory-hugetlb\fP[=on|off] allocate memory from HugeTLB pool [off] .TP .B \fB--memory-oper\fP=STRING type of memory operations {read, write, none} [write] \fB--memory-access-mode\fP=STRING memory access mode {seq,rnd} [seq] .SH THREAD OPTIONS \fB--thread-yields\fP=N number of yields to do per request [1000] .TP .B \fB--thread-locks\fP=N number of locks per thread [8] .SH MUTEX OPTIONS .TP .B \fB--mutex-num\fP=N total size of mutex array [4096] \fB--mutex-locks\fP=N number of mutex locks to do per thread [50000] \fB--mutex-loops\fP=N number of empty loops to do outside mutex lock [10000] .SH SEE ALSO Upstream provided html-formatted manual, describing the features of \fBsysbench\fP: /usr/share/doc/\fBsysbench\fP/manual.html