Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu test: single thread and multi-threads get the same result #144

Closed
chengweiv5 opened this issue Jun 6, 2017 · 4 comments
Closed

cpu test: single thread and multi-threads get the same result #144

chengweiv5 opened this issue Jun 6, 2017 · 4 comments

Comments

@chengweiv5
Copy link

Hi there, I was using sysbench 0.4.12 to do cpu testing, use below command in an 8 vcpu VM

  1. for single thread
    # sysbench --test=cpu --num-threads=1 --cpu-max-prime=50000 run

  2. for 8 threads
    # sysbench --test=cpu --num-threads=8 --cpu-max-prime=50000 run

and from the total time: , I could see that 8 threads is nearly 8 times less than 1 threads, e.g. 2s VS 15s.

However, when I upgrade to sysbench 1.0.5, the results for 1 thread and 8 threads are seems the same, e.g. 10.0117s VS 10.0321s

Is this a problem?

@chengweiv5
Copy link
Author

In addition, I found that, for sysbench 1.0.5, 10000 primes to 100000 primes just get the same result, see below

10000 primes

WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
sysbench 1.0.5 (using system LuaJIT 2.0.4)

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


Prime numbers limit: 10000

Initializing worker threads...

Threads started!


General statistics:
    total time:                          10.0009s
    total number of events:              7384

Latency (ms):
         min:                                  1.21
         avg:                                  1.35
         max:                                  1.76
         95th percentile:                      1.44
         sum:                               9992.83

Threads fairness:
    events (avg/stddev):           7384.0000/0.00
    execution time (avg/stddev):   9.9928/0.00

100000 primes

WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
sysbench 1.0.5 (using system LuaJIT 2.0.4)

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


Prime numbers limit: 100000

Initializing worker threads...

Threads started!


General statistics:
    total time:                          10.0313s
    total number of events:              296

Latency (ms):
         min:                                 32.92
         avg:                                 33.89
         max:                                 35.20
         95th percentile:                     34.95
         sum:                              10030.37

Threads fairness:
    events (avg/stddev):           296.0000/0.00
    execution time (avg/stddev):   10.0304/0.00

@chengweiv5
Copy link
Author

even 1000000 primes

WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options.
sysbench 1.0.5 (using system LuaJIT 2.0.4)

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


Prime numbers limit: 1000000

Initializing worker threads...

Threads started!


General statistics:
    total time:                          10.0336s
    total number of events:              12

Latency (ms):
         min:                                807.62
         avg:                                836.11
         max:                                860.82
         95th percentile:                    861.95
         sum:                              10033.26

Threads fairness:
    events (avg/stddev):           12.0000/0.00
    execution time (avg/stddev):   10.0333/0.00

@akopytov
Copy link
Owner

akopytov commented Jun 6, 2017

Hi, I answered a similar question recently in #140. Do my comments in that issue answer your question?

I'm closing this one, feel free to reopen if this question looks different from #140.

@Willz01
Copy link

Willz01 commented Sep 17, 2020

2 years lol... this just saved me my lecturer gave this ""sysbench --test=cpu --cpu -max -prime =1000 –num -threads =1 run" seem he misplaced the command, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants