-
Notifications
You must be signed in to change notification settings - Fork 70
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
Throughput performance drop #367
Comments
Are you using I'll do some analysis, perhaps my performance regression test needs some enhancement -- I didn't see a regression in my earlier testing. |
No, I'm not using the |
I was able to duplicate this ... I need to review how it slipped through my pre-release testing, and will work on a fix to restore performance. Thanks for reporting! |
I've not had time to work on a proper solution yet. I have run a few tests though, and confirmed that reverting the set_wait_time() PR restores performance (for each test I restarted all the server-side processes and reloaded the database, then ran the 0.13.3
0.14.1-dev
0.14.1-dev reverted set_wait_time() changes
|
@jeremyandrews Sure! I will check it today and will report to you as soon as possible. |
@jeremyandrews I tested your branch https://github.com/jeremyandrews/goose/tree/revert-test and I can confirm that it fixes the issue! Now I'm getting identical results for v0.13.3 and v0.14.1-dev (revert-test), the difference is in the margin of error. |
@zezic Thank you for reporting the problem and testing the fix! I'll get this merged and a release rolled soon. |
To confirm: this regression was because there is a very small amount of overhead in converting a Duration to an integer, but this adds up when making tens of thousands of requests per second. The fix was to not perform any Duration -> integer conversions when |
You mean, pub const fn as_millis(&self) -> u128 {
self.secs as u128 * MILLIS_PER_SEC as u128 + (self.nanos / NANOS_PER_MILLI) as u128
} My guess is that the problem has something to do with the granularity and the nature of the Tokio timers. In documentation for
Maybe that's not the exact reason for the regression but I have suspicion that its related to some mechanic of the Tokio timers which makes awaiting on a sleep with a 0 ms duration to produce some unwanted latency. |
We are experiencing significant throughput regression after commit ef71107 which was introduced with #358.
Before this commit our tests were able to run at ~18000 RPS and it was possible to detect the bottleneck of our service, but after ef71107 we only getting around ~6000 RPS with the same tests and now Goose is bottleneck.
The text was updated successfully, but these errors were encountered: