在平台上使用Sysbench测试CPU
我正在尝试编写一个简单的BASH脚本来测试有关CPU性能的系统/机器,并调整为核心计数。我选择了Sysbench,因为它似乎很容易。 但是,我不知道如何正确解释结果。我应该将每秒事件视为主要指标吗? 当我增加MX Prime数量时,它会迅速下降(由于素数较大?)。
脚本
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
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论