0

I am trying to write a simple bash script to test a system/machine regarding cpu performance, adjusted to core count. I opted for sysbench, since it seemed easy. However, I dont know how to properly interpret the results. Should I look at events per second as the primary metric? When I increase the mx prime count it declines rapidly (due to larger primes?).

The script

user1@machine1:~$ prc_count=$(nproc --all)
user1@machine1:~$ factor=1
user1@machine1:~$ prc_count=$((prc_count*factor))
user1@machine1:~$ sysbench --test=cpu --num-threads=$prc_count --cpu-max-prime=600000 run
WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
WARNING: --num-threads is deprecated, use --threads instead
sysbench 1.0.20 (using bundled LuaJIT 2.1.0-beta2)

Running the test with following options:
Number of threads: 128
Initializing random number generator from current time


Prime numbers limit: 600000

Initializing worker threads...

Threads started!

CPU speed:
    events per second:   325.66

General statistics:
    total time:                          10.2763s
    total number of events:              3347

Latency (ms):
         min:                                  190.99
         avg:                                  384.71
         max:                                  804.36
         95th percentile:                      383.33
         sum:                              1287614.93

Threads fairness:
    events (avg/stddev):           26.1484/0.67
    execution time (avg/stddev):   10.0595/0.07
Stat.Enthus
  • 335
  • 1
  • 12
  • Depends what you're trying to learn about CPU and cache performance, I think. I'm not familiar with sysbench in particular, but the tag mouseover suggests it's for benchmarking the OS, like system-call overheads maybe? Or virtual memory page eviction stuff, and/or inter-process or thread communication either via the OS or shared memory. – Peter Cordes Jun 08 '22 at 19:06
  • I am trying to evaluate weather or not the cpu performance is reasonable or in the same order like other machines with n cores. do you have any ideas? – Stat.Enthus Jun 09 '22 at 11:44

0 Answers0