SYSBENCH(1)
π NAME π
okay bestie, meet sysbench β the multi-threaded benchmark tool for database systems. it's giving "let me stress-test ur whole setup" energy and honestly? iconic.
β¨ SYNOPSIS β¨
sysbench [common-options] --test=name [test-options] <command>
and the commands u can throw at it are: prepare, run, cleanup, help, version. that's the whole menu, babe π
πΈ DESCRIPTION πΈ
So like. SysBench is a modular, cross-platform, multi-threaded benchmark tool, and its whole job is evaluating OS parameters that actually matter for a system running a database under intensive load. no cap.
The whole idea of this benchmark suite? u get a quick impression of how ur system performs without setting up some complex database benchmark, or even without installing a database at all. literally zero database required, we love that for u π«Ά
The design is super simple, and I mean that in the best way. SysBench runs a specified number of threads, and they all execute requests in parallel. The actual workload those requests produce depends on whatever test mode u picked. And u can limit either the total number of requests, or the total time the benchmark runs β or both, if ur feeling extra π
π¬ Compiled-in database drivers:
mysqlβ MySQL driverpgsqlβ PostgreSQL driver
π§ͺ Compiled-in tests:
fileioβ File I/O testcpuβ CPU performance testmemoryβ Memory functions speed testthreadsβ Threads subsystem performance testmutexβ Mutex performance test
All the available test modes are implemented by compiled-in modules, and SysBench was literally designed to make adding new test modes an easy task (devs stay winning). Just know that each test mode may have its own additional, workload-specific options, so read the fine print bestie π
π GENERAL OPTIONS π
--threads=Nβ number of threads to use [1]--events=Nβ limit for the total number of events [0]--time=Nβ limit for total execution time, in seconds [10]--forced-shutdown=STRINGβ how many seconds to wait after the--timelimit hits before forcing shutdown, or'off'to disable that entirely [off]--thread-stack-size=SIZEβ size of the stack per thread [64K]--rate=Nβ average transactions rate. use 0 for unlimited rate [0]--report-interval=Nβ periodically report intermediate statistics, with the interval given in seconds. 0 disables intermediate reports [0]--report-checkpoints=[LIST,...]β dump full statistics and reset all the counters at specified points in time. the argument is a list of comma-separated values representing the amount of time in seconds elapsed from the start of the 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]
ok so those last four? they're the deprecated aliases. they still work but likeβ¦ use the new names, bestie. glow-up ur configs β¨
π² PSEUDO-RANDOM NUMBERS GENERATOR OPTIONS π²
--rand-type=STRINGβ random numbers distribution, one of {uniform,gaussian,pareto} [special]--rand-seed=Nβ seed for the random number generator. when it's 0, the current time is used as the RNG seed. [0]--rand-pareto-h=Nβ parameterhfor 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β which percentile to calculate in the latency statistics (1-100). use the special value of 0 to disable percentile calculations entirely [95]--histogram[=on|off]β print a latency histogram in the report [off]
ποΈ GENERAL DATABASE OPTIONS ποΈ
--db-driver=STRINGβ specifies the database driver to use (pass'help'to get the list of available drivers) [mysql]--db-ps-mode=STRINGβ prepared statements usage mode, one of {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-ssl[=on|off]β use SSL connections, if they're available in the client library [off]--mysql-ssl-cipher=STRINGβ use a specific cipher for SSL connections []--mysql-compression[=on|off]β use compression, if it's 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 actually 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 the files to create [2G]--file-test-mode=STRINGβ test mode, one of {seqwr,seqrewr,seqrd,rndrd,rndwr,rndrw}--file-io-mode=STRINGβ file operations mode, one of {sync,async,mmap} [sync]--file-async-backlog=Nβ number of asynchronous operations to queue per thread [128]--file-extra-flags=[LIST,...]β list of additional flags to use when opening files, one of {sync,dsync,direct} []--file-fsync-freq=Nβ dofsync()after this number of requests (0 - don't usefsync()) [100]--file-fsync-all[=on|off]β dofsync()after each write operation [off]--file-fsync-end[=on|off]β dofsync()at the end of the test [on]--file-fsync-mode=STRINGβ which method to use for synchronization, one of {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 the combined test [1.5]
π§ CPU OPTIONS π§
--cpu-max-prime=Nβ upper limit for the primes generator [10000]
πΎ MEMORY OPTIONS πΎ
--memory-block-size=SIZEβ size of the memory block for the test [1K]--memory-total-size=SIZEβ total size of data to transfer [100G]--memory-scope=STRINGβ memory access scope, one of {global,local} [global]--memory-hugetlb[=on|off]β allocate memory from the HugeTLB pool [off]--memory-oper=STRINGβ type of memory operations, one of {read,write,none} [write]--memory-access-mode=STRINGβ memory access mode, one of {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 the 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 the mutex lock [10000]
π¦ SEE ALSO π¦
the upstream-provided html-formatted manual, describing all the features of sysbench: /usr/share/doc/sysbench/manual.html β go read it, iykyk πβ¨
okay that's the whole page bestie, u ate that π this was sysbench(1) β "Benchmark tool for database systems", dated way in the future on 25 June 2026 π periodt, go benchmark something and tell me how it went ππ
π¦ where this page comes from
- ubuntu stonking: sysbench 1.0.20+ds-9 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms