-
Notifications
You must be signed in to change notification settings - Fork 395
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
wrk2 produces incorrect results #138
Comments
I'm also evaluating which load tool to use, so I'm glad to have come across your write-up and finding. Just wondering about 2 points:
I checked both wrk2 and wrk's documentation and couldn't seem to find what the calibration is for though. |
Good questions. Re (1), there is no reason to use so many connections except that the bogus results became most apparent when I did. Note that I found the most reliable results when I set #threads == #connections. My own project found that between 10 and 40 produced the maximum number of requests. Re (2), I did not try that same test with a 10s period. I will do so now, on your prompting:
I get much more reasonable results, though they still range between 200,000 and 500,000 requests, which is 2 to 4 times what I get with any other tool, so I think they're still not correct. |
In that last 10-second test, the problems still seems to be the time it thinks it took to finish, which ranges from 3 to 10s (when it actually took 10s). |
Not sure if this topic is still of interest... recently I had some time to read the source code, I think below might be an explanation:
So in the case of using 1000 connections, the test duration should ideally be > 15 sec, otherwise it would still in the middle of the calibration period. I found it's more reliable to test with a duration of 60s. Searching wrk's issue discussion, it seems wrk used to have this calibration period too, but then it was removed around 2018 (wg/wrk#280 (comment)) . If I find some time I'll try to remove it in my local build and see if it allows running with short test duration. |
If you are able to improve this, that would be FAB! |
As you can see in my write-up here, wrk2 can produce bad results under certain conditions. For example:
See how I specified 250 threads, and a 5s test? Well, it did create 833071 requests in 5s, but as you see, it thinks it did it in 1.25ms, producing a ridiculous figure of 663 million requests/sec.
It doesn't always think it's finished in milliseconds. Sometimes it is more like 1s and other times closer to 5.
You can check out my repository that uses wrk2 here if you want to reproduce the bug.
The text was updated successfully, but these errors were encountered: