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

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 --time limit 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 β€” parameter h 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 β€” 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 β€” 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 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