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

sysbench wasm module of CPU workload is giving unexpected results than native gcc compiled sysbench cpu workload. #3759

Open
subhakr opened this issue Aug 29, 2024 · 0 comments

Comments

@subhakr
Copy link

subhakr commented Aug 29, 2024

Subject of the issue

I am getting unnexpected results in cpu workload of sysbench wasm module.

Test case

sysbench.zip

Your environment

*Host OS: Ubuntu 22.04 LTS
*WAMR version: 2.1.1
*CPU architecture: x86_64
*RAM:8 GB
*Internal space:256 GB

Steps to reproduce

admin1@admin1-VivoBook-ASUSLaptop-X515EA-P1511CEA:~/sysbench_main$ /home/admin1/Documents/wasm-micro-runtime/product-mini/platforms/linux/build/iwasm sysbench.aot cpu --cpu-max-prime=20000 --time=3 run
Attempting to allocate 1064960 bytes of memory...
sysbench 1.1.0-2ca9e3f (using Lua Lua 5.3)

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


Prime numbers limit: 20000

Initializing worker threads...

Threads started!

CPU speed:
    events per second: 773738.73

Throughput:
    events/s (eps):                      773738.7288
    time elapsed:                        3.0002s
    total number of events:              2321354

Latency (ms):
         min:                                    0.00
         avg:                                    0.00
         max:                                    0.05
         95th percentile:                        0.00
         sum:                                  688.21

Threads fairness:
    events (avg/stddev):           2321354.0000/0.00
    execution time (avg/stddev):   0.6882/0.00

In gcc compilation of sysbench i am getting below results.

admin1@admin1-VivoBook-ASUSLaptop-X515EA-P1511CEA:~/sysbench_main$ sysbench cpu --cpu-max-prime=20000 --time=3 run
sysbench 1.0.20 (using system LuaJIT 2.1.0-beta3)

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


Prime numbers limit: 20000

Initializing worker threads...

Threads started!

CPU speed:
    events per second:  1340.51

General statistics:
    total time:                          3.0005s
    total number of events:              4024

Latency (ms):
         min:                                    0.73
         avg:                                    0.75
         max:                                    1.61
         95th percentile:                        0.78
         sum:                                 2999.55

Threads fairness:
    events (avg/stddev):           4024.0000/0.00
    execution time (avg/stddev):   2.9996/0.00

why i am getting the result with this much difference in wasm module

Expected behavior

It should get either slight better result or slight lower results than native results

Actual behavior

I am getting too much high results in sysbench wasm module.

Extra Info

IS ANY THING OPTIMIZED FOR CPU RELATED OPERATIONS.

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

No branches or pull requests

1 participant