使用sysbench对Oracle做基准测试(二) CPU

./sysbench --test=cpu  --指明要测试的是CPU
--cpu-max-prime    --最大的素数
--max-requests=20  --最大的请求次数,
--max-time=20      --最长允许执行时间,这只是一个软阀值


[root@localhost sysbench]# ./sysbench --test=cpu  --cpu-max-prime=20000 run
sysbench 0.5:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1
Random number generator seed is 0 and will be ignored


Primer numbers limit: 20000

Threads started!


General statistics:
    total time:                          43.2617s         --总运行时间
    total number of events:              10000            --循环的次数
    total time taken by event execution: 43.2237s         --循环的执行时间
    response time:
         min:                                  3.83ms     --最小单次执行时间
         avg:                                  4.32ms     --平均单次执行时间
         max:                                 67.89ms     --最长单次执行时间
         approx.  95 percentile:               5.33ms     --除去最高的5%剩余的95%中最长的执行时间

Threads fairness:
    events (avg/stddev):           10000.0000/0.00
    execution time (avg/stddev):   43.2237/0.00
    

[root@localhost sysbench]# ./sysbench --test=cpu  --cpu-max-prime=5000  --max-requests=20  run 
sysbench 0.5:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1
Random number generator seed is 0 and will be ignored


Primer numbers limit: 5000

Threads started!


General statistics:
    total time:                          0.0169s
    total number of events:              20
    total time taken by event execution: 0.0165s
    response time:
         min:                                  0.59ms
         avg:                                  0.83ms
         max:                                  1.94ms
         approx.  95 percentile:               1.80ms

Threads fairness:
    events (avg/stddev):           20.0000/0.00
    execution time (avg/stddev):   0.0165/0.00    


[root@localhost sysbench]# ./sysbench --test=cpu  --cpu-max-prime=5000  --max-time=20  run 
sysbench 0.5:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1
Random number generator seed is 0 and will be ignored


Primer numbers limit: 5000

Threads started!


General statistics:
    total time:                          6.4062s
    total number of events:              10000
    total time taken by event execution: 6.3912s
    response time:
         min:                                  0.59ms
         avg:                                  0.64ms
         max:                                  8.18ms
         approx.  95 percentile:               0.78ms

Threads fairness:
    events (avg/stddev):           10000.0000/0.00
    execution time (avg/stddev):   6.3912/0.00
--max-time=20      --最长允许执行时间,这只是一个软阀值,虽然设置为20,结果还是跑了25秒
                   --感觉类似于一个任务开始之前,看一下之前所执行的任务用了多久,如果没有超过max-time,则开启次任务,任务一旦开启不会自动终止,一直要等到跑完
[root@localhost sysbench]# ./sysbench --test=cpu  --cpu-max-prime=5000000  --max-time=20  run 
sysbench 0.5:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1
Random number generator seed is 0 and will be ignored


Primer numbers limit: 5000000

Threads started!


General statistics:
    total time:                          25.0598s
    total number of events:              3
    total time taken by event execution: 25.0595s
    response time:
         min:                               8251.50ms
         avg:                               8353.18ms
         max:                               8455.09ms
         approx.  95 percentile:            8455.89ms

Threads fairness:
    events (avg/stddev):           3.0000/0.00
    execution time (avg/stddev):   25.0595/0.00
    


你可能感兴趣的:(oracle,cpu,sysbench,基准测试)