This is a long post with benchmark results for those who are interested
Benchmarks are done with the latest version of sysbench on my Raspberry Pi 3B+ overclocked to 1500MHz.
Just to show what's possible I copied the output of the benchmark tests that I did below, I also added the commands that I used to set up sysbench, it may be useful because it changed quite significantly.
The first benchmark test I did is testing threads and limited it to 10,000 events as you can see below:
sysbench --threads=4 --time=0 --events=10000 --debug=on --validate=on threads run
sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 4
Debug mode enabled.
Validation checks: on.
Initializing random number generator from current time
Doing thread subsystem performance test
Thread yields per test: 1000 Locks used: 8
Initializing worker threads...
DEBUG: Worker thread (#0) started
DEBUG: Worker thread (#0) initialized
DEBUG: Worker thread (#1) started
DEBUG: Worker thread (#1) initialized
DEBUG: Worker thread (#3) started
DEBUG: Worker thread (#3) initialized
DEBUG: Worker thread (#2) started
DEBUG: Worker thread (#2) initialized
Threads started!
Event limit exceeded, exiting...
(last message repeated 3 times)
Done.
General statistics:
total time: 15.9623s
total number of events: 10000
Latency (ms):
min: 5.78
avg: 6.38
max: 68.81
95th percentile: 7.70
sum: 63807.90
Threads fairness:
events (avg/stddev): 2500.0000/33.59
execution time (avg/stddev): 15.9520/0.00
DEBUG: Verbose per-thread statistics:
DEBUG: thread # 0: min: 0.0058s avg: 0.0063s max: 0.0603s events: 2528
DEBUG: total time taken by event execution: 15.9572s
DEBUG: thread # 1: min: 0.0058s avg: 0.0064s max: 0.0537s events: 2504
DEBUG: total time taken by event execution: 15.9539s
DEBUG: thread # 2: min: 0.0058s avg: 0.0063s max: 0.0688s events: 2524
DEBUG: total time taken by event execution: 15.9514s
DEBUG: thread # 3: min: 0.0058s avg: 0.0065s max: 0.0509s events: 2444
DEBUG: total time taken by event execution: 15.9454s
Then I did a benchmark for the CPU with the limit at 100,000 events, results below:
sysbench --threads=4 --time=0 --events=100000 --debug=on --validate=on cpu run
sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 4
Debug mode enabled.
Validation checks: on.
Initializing random number generator from current time
Doing CPU performance benchmark
Prime numbers limit: 10000
Initializing worker threads...
DEBUG: Worker thread (#0) started
DEBUG: Worker thread (#0) initialized
DEBUG: Worker thread (#1) started
DEBUG: Worker thread (#1) initialized
DEBUG: Worker thread (#2) started
DEBUG: Worker thread (#2) initialized
DEBUG: Worker thread (#3) started
DEBUG: Worker thread (#3) initialized
Threads started!
Event limit exceeded, exiting...
(last message repeated 3 times)
Done.
CPU speed:
events per second: 2761.26
General statistics:
total time: 36.2100s
total number of events: 100000
Latency (ms):
min: 1.33
avg: 1.45
max: 31.55
95th percentile: 1.52
sum: 144739.97
Threads fairness:
events (avg/stddev): 25000.0000/149.42
execution time (avg/stddev): 36.1850/0.01
DEBUG: Verbose per-thread statistics:
DEBUG: thread # 0: min: 0.0013s avg: 0.0014s max: 0.0270s events: 25033
DEBUG: total time taken by event execution: 36.1891s
DEBUG: thread # 1: min: 0.0013s avg: 0.0014s max: 0.0316s events: 25111
DEBUG: total time taken by event execution: 36.1722s
DEBUG: thread # 2: min: 0.0013s avg: 0.0015s max: 0.0247s events: 24747
DEBUG: total time taken by event execution: 36.1901s
DEBUG: thread # 3: min: 0.0013s avg: 0.0014s max: 0.0254s events: 25109
DEBUG: total time taken by event execution: 36.1886s
Because the above test are done so fast I did run two more tests that ran a bit longer to get the temperature up to the highest point which is 47 degree Celsius when I run the threads test, when I run the normal CPU performance test I don't see the temperature go higher than 42 degrees.
2nd threads test with the limit set to 40,000 events, results below:
sysbench --threads=4 --time=0 --events=40000 --debug=on --validate=on threads run
sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 4
Debug mode enabled.
Validation checks: on.
Initializing random number generator from current time
Doing thread subsystem performance test
Thread yields per test: 1000 Locks used: 8
Initializing worker threads...
DEBUG: Worker thread (#0) started
DEBUG: Worker thread (#0) initialized
DEBUG: Worker thread (#1) started
DEBUG: Worker thread (#1) initialized
DEBUG: Worker thread (#2) started
DEBUG: Worker thread (#2) initialized
DEBUG: Worker thread (#3) started
DEBUG: Worker thread (#3) initialized
Threads started!
Event limit exceeded, exiting...
(last message repeated 3 times)
Done.
General statistics:
total time: 63.8808s
total number of events: 40000
Latency (ms):
min: 5.72
avg: 6.39
max: 151.23
95th percentile: 8.74
sum: 255445.60
Threads fairness:
events (avg/stddev): 10000.0000/68.94
execution time (avg/stddev): 63.8614/0.00
DEBUG: Verbose per-thread statistics:
DEBUG: thread # 0: min: 0.0057s avg: 0.0063s max: 0.0567s events: 10096
DEBUG: total time taken by event execution: 63.8596s
DEBUG: thread # 1: min: 0.0057s avg: 0.0064s max: 0.0829s events: 9919
DEBUG: total time taken by event execution: 63.8650s
DEBUG: thread # 2: min: 0.0057s avg: 0.0064s max: 0.0694s events: 9953
DEBUG: total time taken by event execution: 63.8559s
DEBUG: thread # 3: min: 0.0057s avg: 0.0064s max: 0.1512s events: 10032
DEBUG: total time taken by event execution: 63.8650s
2nd CPU performance test with the time limit set at 300 seconds (5 minutes), results below:
sysbench --threads=4 --time=300 --debug=on --validate=on cpu run
sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)
Running the test with following options:
Number of threads: 4
Debug mode enabled.
Validation checks: on.
Initializing random number generator from current time
Doing CPU performance benchmark
Prime numbers limit: 10000
Initializing worker threads...
DEBUG: Worker thread (#0) started
DEBUG: Worker thread (#0) initialized
DEBUG: Worker thread (#1) started
DEBUG: Worker thread (#1) initialized
DEBUG: Worker thread (#2) started
DEBUG: Worker thread (#2) initialized
DEBUG: Worker thread (#3) started
DEBUG: Worker thread (#3) initialized
Threads started!
Time limit exceeded, exiting...
(last message repeated 3 times)
Done.
CPU speed:
events per second: 2752.74
General statistics:
total time: 300.0011s
total number of events: 825837
Latency (ms):
min: 1.33
avg: 1.45
max: 34.85
95th percentile: 1.61
sum: 1199254.28
Threads fairness:
events (avg/stddev): 206459.2500/346.86
execution time (avg/stddev): 299.8136/0.01
DEBUG: Verbose per-thread statistics:
DEBUG: thread # 0: min: 0.0013s avg: 0.0015s max: 0.0336s events: 205927
DEBUG: total time taken by event execution: 299.8217s
DEBUG: thread # 1: min: 0.0013s avg: 0.0015s max: 0.0296s events: 206476
DEBUG: total time taken by event execution: 299.8171s
DEBUG: thread # 2: min: 0.0013s avg: 0.0015s max: 0.0348s events: 206537
DEBUG: total time taken by event execution: 299.8139s
DEBUG: thread # 3: min: 0.0013s avg: 0.0014s max: 0.0307s events: 206897
DEBUG: total time taken by event execution: 299.8017s