Linux command ‘sysbench‘ – is a multi threaded benchmarking tool for evaluating system performance across CPU memory file I/O and database workloads

sysbench – run system benchmarks

root@pve-s740-05:~# lscpu -e
CPU NODE SOCKET CORE L1d:L1i:L2 ONLINE MAXMHZ MINMHZ MHZ
0 0 0 0 0:0:0 yes 2500.0000 800.0000 2396.1599
1 0 0 1 2:2:0 yes 2500.0000 800.0000 2398.5801
2 0 0 2 4:4:0 yes 2500.0000 800.0000 2396.1350
3 0 0 3 6:6:0 yes 2500.0000 800.0000 2302.1060
root@pve-s740-05:~#
root@js-ubuntu-26-04-01:~# sysbench cpu run –threads=4
sysbench 1.0.20 (using system LuaJIT 2.1.1761786044)
Running the test with following options:
Number of threads: 4
Initializing random number generator from current time
Prime numbers limit: 10000
Initializing worker threads…
Threads started!
CPU speed:
events per second: 5057.88
General statistics:
total time: 10.0005s
total number of events: 50593
Latency (ms):
min: 0.75
avg: 0.79
max: 48.73
95th percentile: 0.77
sum: 39945.45
Threads fairness:
events (avg/stddev): 12648.2500/91.63
execution time (avg/stddev): 9.9864/0.00
root@js-ubuntu-26-04-01:~#
root@pve-n8n-02:~# cd /tmp
root@pve-n8n-02:/tmp# sysbench fileio –file-total-size=1G –file-test-mode=rndrw –time=30 –max-requests=0 prepare
sysbench 1.0.20 (using system LuaJIT 2.1.1761786044)
128 files, 8192Kb each, 1024Mb total
Creating files for the test…
Extra file open flags: (none)
Creating file test_file.0
Creating file test_file.1
…
Creating file test_file.126
Creating file test_file.127
1073741824 bytes written in 0.93 seconds (1104.94 MiB/sec).
root@pve-n8n-02:/tmp# sysbench fileio –file-total-size=1G –file-test-mode=rndrw –time=30 –max-requests=0 run
sysbench 1.0.20 (using system LuaJIT 2.1.1761786044)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Extra file open flags: (none)
128 files, 8MiB each
1GiB total file size
Block size 16KiB
Number of IO requests: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Initializing worker threads…
Threads started!
File operations:
reads/s: 53898.47
writes/s: 35932.29
fsyncs/s: 114985.24
Throughput:
read, MiB/s: 842.16
written, MiB/s: 561.44
General statistics:
total time: 30.0004s
total number of events: 6144884
Latency (ms):
min: 0.00
avg: 0.00
max: 1.55
95th percentile: 0.01
sum: 26182.78
Threads fairness:
events (avg/stddev): 6144884.0000/0.00
execution time (avg/stddev): 26.1828/0.00
root@pve-n8n-02:/tmp# sysbench fileio –file-total-size=1G –file-test-mode=rndrw –time=30 –max-requests=0 cleanup
sysbench 1.0.20 (using system LuaJIT 2.1.1761786044)
Removing test files…
root@pve-n8n-02:/tmp#

Leave a Reply

You must be logged in to post a comment.