-
Notifications
You must be signed in to change notification settings - Fork 129
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
Slow performance on Linux? #336
Comments
When running the benchmark using tokio and sending all the requests at once and waiting for them to return concurrently it's a lot better. Tested with
|
I was able to replicate this on Ubuntu. Wonder where the performance loss is occuring |
Hello, we've been testing this benchmark on our own systems. When plugged we see benchmark results in line with the ones you have posted for non-Linux platforms, @alshdavid. That said, we've noticed that power saving mode or throttling due to being unplugged has a massive effect on the results. For instance, when I switch my machine to "Power Saver" in Gnome the results I get are: Ryzen 7 7840U / Ubuntu
Macbook M3 Max
Perhaps what's happening here is that the Linux implementation is very sensitive to power saving mode. |
I can confirm the same (i.e worse performance on power saving and numbers on par with OP's Windows and MacOS for performance mode) on NixOS 24.05, 24 × 12th Gen Intel® Core™ i7-12800HX, 64GB RAM
|
Hi, I have written a wrapper util on top of
ipc_channel
that handles the handshake, swapping channels between the host/child and adds a request/response API.The performance on my M1 MBP was great, but I was surprised to find that the performance on Linux was significantly slower!
So I wrote a benchmark to test it out. The benchmark sends n requests, blocking on their responses (100k requests means 200k messages over the channel).
I'm not sure if it's my configuration, perhaps something else is interfering, however here are my results
Hardware
Results
macos
0.487s
windows
0.356s
linux
2.301s
macos
1.550s
windows
3.497s
linux
13.608s
macos
14.404s
windows
34.769s
linux
150.514s
Time taken for n round trip messages - Lower is better
I am have tried with/without the
memfd
option enabled and I have tried making this async (using tokio channels/threads) with the same outcome.This is my wrapper (benchmarks are under
examples
)https://github.com/alshdavid/ipc-channel-adapter
To run the benchmark run
just bench {number_of_requests}
e.g.just bench 100000
I'm investigating if another dependency is interfering, will update with my findings - but at the surface, any idea why this might be?
The text was updated successfully, but these errors were encountered: