Skip to content
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

A couple of bandwidth_upload-related fixes #80

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

stapelberg
Copy link
Contributor

It took me a while to figure out why configuring bandwidth_upload is necessary and what would happen if one didn’t configure it, so here are a bunch of small improvements on the documentation.

@markfoodyburton
Copy link

I've set bandwidth_upload on both server and client side. On the client side it seems to have little effect, is that expected. In the 1.0 to 2.x upgrade.m it suggests: bandwidth_download must be replaced by bandwidth_upload on the server side and removed client side. Does that mean that on the client side you can't set bandwidth?
Cheers
Mark.

@zehome
Copy link
Owner

zehome commented Aug 1, 2016

First, sorry for the late anwser.

mlvpn release has a bug in the roundrobind algorithm. The system calculates a weight based on "bandwidth_upload" of all the active links. The result is set as a float ( 1024Kbps on one link, 768Kbps on the other will make a wrr of like 1 on the first link and 0.75 on the other). The problem is that the system which choose what link to send a packet to does not handle properly the floating point values and uses integers.

As a result, a weigh of 0.75 is considered like a 1.0, so the balancing does not take into account the weight properly.

I'm working on a patch which will solves this problem.

bandwidth_download and bandwidth_upload was used the following way:

  • If mode == "server": use bandwidth_download
  • If mode == "client": use bandwidth_upload

It was not very clear in the configuration what this system was doing, so it was replaced by a single parameters on BOTH sides: "bandwidth_upload".

If your server is the one with big bandwidth, then, bandwidth_upload corresponds to the "client" download speed, and the other way around for the client upload speed.

You'll need to set it on both side corresponding to the expected maximum speed you want.

@zehome
Copy link
Owner

zehome commented Aug 1, 2016

Btw thank you for the merge request, I'll need some more time to get back from holidays and work on thoses patches

@markfoodyburton
Copy link

Seems like that explains my issue.

#bandwidth_upload = 512000

#[dsl2]
##0.0.0.0 to listen on any interface, any ipv4 address
#bindhost = "0.0.0.0"
#remotehost = "10.2.3.4"
#remoteport = 5082
### Bandwidth of this link, in bytes/s. If not specified, each link will only
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's necessary to repeat the comment from above

@stapelberg
Copy link
Contributor Author

Addressed your comments. Please take another look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants