# 如何评估一台服务器的 CPU 性能

Issue

欢迎在 Issue 中交流与讨论: Issue 407

Author

回答者: shfshanyue

# sysbench

$ sysbench --threads=4 --time=30 cpu run

sysbench 1.0.17 (using system LuaJIT 2.1.0-beta3)

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:  3651.16

General statistics:
    total time:                          30.0010s
    total number of events:              109545

Latency (ms):
         min:                                    1.08
         avg:                                    1.10
         max:                                    5.78
         95th percentile:                        1.12
         sum:                               119955.35

Threads fairness:
    events (avg/stddev):           27386.2500/91.56
    execution time (avg/stddev):   29.9888/0.00

# stress

扫码关注公众号全栈成长之路,并发送

即可在关注期间无限制浏览本站全部文章内容

你也可以在文章关于回复公众号扫码解锁全站的技术实现中获得解锁代码,永久解锁本站全部文章

Last Updated: 10/12/2020, 12:24:45 PM