-
Notifications
You must be signed in to change notification settings - Fork 239
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
What about the performance of yamux? It seems yamux speed down a lot of bandwidth. #24
Comments
Hi @liudanking can you share any of your benchmarking code? There are a lot of things that could affect performance such as your payload size relative to the default window size, as well as how your receiver was performing (there's back pressure on the sender through the window mechanism). Yamux itself is pretty lightweight, but it is a TCP-style implementation so can have complex behavior in some cases. |
@slackpad Thank you for your attention. The test I wrote is not a real benchmark. It is simple:
All yamux related code uses the default config. The ping between client and server is about |
I run the test with One thing that is strange: the stream speed is always 28mbps when speed becomes stable. The problem to speed up stream speed is converted to how to optimize yamux stream window control algorithm just at @slackpad mentioned. I try to set the |
highly concern on this |
Just to chime in here a bit, ipfs uses yamux as the default stream multiplexer for all connections, on LAN connections i've seen some pretty impressive speeds (>100mbps). We do use many streams per transfer though, not just sending data over a single stream. |
I write a simple
tcp tunnel
with yamux, and test the speed:client --> server
): 64mbps ~ 75mbpsclient --> yamux client --stream--> yamux server --> server
) : 24mbps ~ 28mbpsFrom the rough test above, we may conclude that yamux speed down a lot of bandwidth. Is there any methods that can improve throughtput yamux?
The text was updated successfully, but these errors were encountered: