Sysbench is a scriptable, multi-threaded benchmarking tool for evaluating Linux system performance, especially for databases but also CPU, memory, file I/O, and more. It's ideal for quick hardware tests without complex setups.
Information
sysbench is one of the preinstalled packages for our r/Techsupport Rescue Media. If you are using this live image, you can skip the installation section.
How to install sysbench
Refer below for installation instructions if you are not using our live image or want to install it on your own system.
This is a guide for making your own custom tests. Sysbench includes these built-in tests, each focusing on a system component.
cpu: Measures CPU performance via prime number calculations.
memory: Tests memory speed for read/write operations.
fileio: Benchmarks file I/O throughput and latency.
threads: Evaluates threads subsystem efficiency.
mutex: Assesses mutex lock contention.
Lua scripts like oltp_read_write add database benchmarks (requires MySQL/PostgreSQL). For more information, please refer to the official Sysbench documentation.
Run sysbench [test] help for test-specific options. Common commands: prepare (setup), run (benchmark), cleanup (teardown). Use --threads=N (e.g., CPU cores), --time=60 for duration (in seconds).