sysbench is a scriptable multi-threaded benchmark tool. 1


sysbench can be installed with the Pakfire web interface or via the console:

pakfire install sysbench


There is no web interface for this Addon. To run this Addon open the client console or terminal and access the IPFire box via SSH.

To obtain a list of possible options:
sysbench --help

The output is similar to this:

[root@ipfire ~]# sysbench --help
  sysbench [general-options]... --test=<test-name> [test-options]... command
. . .
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
oltp - OLTP test
. . .
See 'sysbench --test=<name> help' for a list of options for each test.


CPU Benchmark

Benchmark CPU performance as follows:

sysbench --test=cpu --cpu-max-prime=20000 run

Look for Test execution summary - total time. Example:

total time:                          54.9157s

Memory Benchmark

Read memory performance:

sysbench --test=memory --memory-block-size=1K --memory-scope=global --memory-total-size=100G --memory-oper=read run

Write memory performance:

sysbench --test=memory --memory-block-size=1K --memory-scope=global --memory-total-size=100G --memory-oper=write run

Look for the operations per second and throughput.

Operations performed: 104857600 (1208603.66 ops/sec)
102400.00 MB transferred (1180.28 MB/sec)

File IO Benchmark

Measure file IO performance:

#  create a temp directory on a partition that has available space
cd $(mktemp -d /var/tmp/tmp.XXXXXXXXX)

#  create a test file larger (much larger) than the total amount of RAM
sysbench --test=fileio --file-total-size=10G prepare

#  now run the benchmark!
sysbench --test=fileio --file-total-size=10G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run

#  Finally delete the test files from the temp directory
sysbench --test=fileio cleanup

Do you see this error FATAL: Failed to write file! errno = 28? Then there is no space left in the current partition. Run the above command cd $(mktemp -d /var/tmp/tmp.XXXXXXXXX).

[root@ipfire ~]# cd $(mktemp -d /var/tmp/tmp.XXXXXXXXX)

[root@ipfire ~]# sysbench --test=fileio --file-total-size=10G prepare
sysbench 0.4.12:  multi-threaded system evaluation benchmark

128 files, 81920Kb each, 10240Mb total
Creating files for the test...

[root@ipfire ~]# sysbench --test=fileio --file-total-size=10G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1
Initializing random number generator from timer.

Extra file open flags: 0
128 files, 80Mb each
10Gb total file size
Block size 16Kb
Number of random requests for random IO: 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
Threads started!
Time limit exceeded, exiting...

Operations performed:  173220 Read, 115480 Write, 369527 Other = 658227 Total
Read 2.6431Gb  Written 1.7621Gb  Total transferred 4.4052Gb  (15.036Mb/sec)
`962.33 Requests/sec executed`

Test execution summary:
  total time:                          300.0006s
  total number of events:              288700
  total time taken by event execution: 42.0377
  per-request statistics:
       min:                                  0.01ms
       avg:                                  0.15ms
       max:                                  6.41ms
       approx.  95 percentile:               0.36ms

Threads fairness:
  events (avg/stddev):           288700.0000/0.00
  execution time (avg/stddev):   42.0377/0.00

[root@ipfire ~]# sysbench --test=fileio cleanup
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Removing test files...

The current pakfire sysbench release is version 0.4.12 and was released near 19 March 2009.

Edit Page ‐ Yes, you can edit!

Older Revisions • August 16, 2019 at 7:12 pm • Jon