-
Notifications
You must be signed in to change notification settings - Fork 103
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
performance: upstream and downstream will never run concurrently #1327
Comments
Did you push the prototype code? |
It shouldn't be terribly hard to use A little more expensive for trivial cases, but probably worth it for all the others. |
I think we can collect multiple handles from tokio::spawn and then await them. I presume something like that is what @howardjohn already tried but didn't see any benefit from. |
Yeah - I misread. It probably doesn't make much difference because we already spawn the per-workload handler in a thread and are not remotely CPU bound even under load - distributing this specific operation across threads won't help much (and might make it easier for a greedy workload to starve other workloads on the node). in general sticking with a one-thread-per-conn-handler-instance model seems best. |
copy_bidirectional
usestokio::join
for the copy from upstream->downstream and vis-versa. Join is not concurrent, so its impossible for these two to happen at the same time (utilizing threads).Intuitively it seems like this should be helpful. On a simple call-response workload, no, but if there is continuous flow of data in both directions it should.
I put together a prototype, however, and do not see any benefits:
We should investigate more
The text was updated successfully, but these errors were encountered: