www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

New bonding mode for increasing the bandwidth

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
fulvio
Site Admin


Joined: 01 Nov 2006
Posts: 1077

PostPosted: Wed Jan 15, 2014 7:50 pm    Post subject: New bonding mode for increasing the bandwidth Reply with quote

Hi,

the Weighted Bonding has been implented for Zeroshell 3.0.0 as new feature. Using the Weighted Bonding you can distribute traffic proportionally to the capacity of the interfaces that are part of the bond. Before the introduction of this feature, the traffic distribution was made by a simple Round-Robin load balancing that treated the interfaces in a uniform manner regardless of the actual available bandwidth on each of them. The direct consequence of this was that you could benefit from bonding only if the lines merged had a similar capacity . You could see that adding an ADSL line from 2Mb/s to a 7Mb/s one resulted in a bandwidth closed to 4Mbit/s. Far from the expeted 9Mb/s bandwidth.
Now with the Weighted Bonding, by assigning to the first ADSL line a weight of 2 and to the second one a weight equal to 7, you could see a bandwidth aggregation very close to the sum of the two lines members of the bonding.
Note that in the example has been intentionally omitted, for simplicity, to specify that the bonding of WAN lines only makes sense through the VPN bonding and that the weight should be assigned to the Layer 2 VPN interfaces.

Regards
Fulvio


Last edited by fulvio on Sun May 11, 2014 1:23 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
DrmCa



Joined: 12 Apr 2011
Posts: 233

PostPosted: Thu Jan 16, 2014 9:25 pm    Post subject: Reply with quote

Thank you for all your work Fulvio - much appreciated!

What configuration is required to take advantage of this feature?
Back to top
View user's profile Send private message
Yhoni



Joined: 19 May 2013
Posts: 31

PostPosted: Sat Jan 25, 2014 8:00 pm    Post subject: Reply with quote

Thank you very much for your work.
Back to top
View user's profile Send private message
DrmCa



Joined: 12 Apr 2011
Posts: 233

PostPosted: Tue Jan 28, 2014 5:47 pm    Post subject: Reply with quote

Something is odd. Not 100% sure yet, but it looks like since I installed weighted bonding, load balancing is not working anymore. Again.
Uninstalled weighted bonding, but still no load balancing.

This is driving me nuts, as load balancing is the only reason I am using a soft router.

I did a dozen of multi-stream downloads and none went above 1 line's capacity, as previously they were always at 2x lines capacity.
All I am getting is roughly 450 Kb/s when it should be 1.2 Mb/s.

I am already afraid to touch the box because every time I do, load balancing dies. Why is LB so fragile and vulnerable?
Back to top
View user's profile Send private message
fulvio
Site Admin


Joined: 01 Nov 2006
Posts: 1077

PostPosted: Tue Jan 28, 2014 6:35 pm    Post subject: Reply with quote

Sorry, but I am not able to give you an answer. Could you describe your setup?
Regards
Fulvio
Back to top
View user's profile Send private message Send e-mail
DrmCa



Joined: 12 Apr 2011
Posts: 233

PostPosted: Wed Jan 29, 2014 2:26 pm    Post subject: Reply with quote

Still looks like connection is not load balanced Sad I tried uTorrent which usually downloaded at 1.2 MB/s but it too was going at 465 kb/s at best.

What I have is an old Dell machine with P4 2.2Ghz where there is an on-board 3Com NIC used for LAN and 2 Intel NICs in the PCI slots for the DSL modems.

For the modems I am using 2x TP-Link 8616 in bridge mode.

Each DSL line is assigned a static IP by the provider, i.e. I am simply entering user name and password into the pppoe set up and it comes up.

Both ppp0 and ppp1 were added to the net balancing screen with the weight of 1. I have screenshots in this thread:

http://zeroshell.org/forum/viewtopic.php?t=4216

It was about v.2 and now the only difference is that I am on v.3, otherwise setup is the same. I don't have any LB rules. When I moved from v.2 to v.3 all I did was removing pre-boot cron script that was activating atheling's patch since I was on 1.0b.
Back to top
View user's profile Send private message
fulvio
Site Admin


Joined: 01 Nov 2006
Posts: 1077

PostPosted: Wed Jan 29, 2014 7:18 pm    Post subject: Reply with quote

To increase the Internet bandwidth in layer 2 you should configure the VPN bonding with a peer that has at least a bandwidth corresponding to the sum of the bandwidth of your DSL.
You did not mention you VPN configuration.
Regards
Fulvio
Back to top
View user's profile Send private message Send e-mail
DrmCa



Joined: 12 Apr 2011
Posts: 233

PostPosted: Wed Jan 29, 2014 8:24 pm    Post subject: Reply with quote

I don't use VPN at all. All I need is load-balancing of both ppp connections.
Am I misunderstanding anything?
Back to top
View user's profile Send private message
DrmCa



Joined: 12 Apr 2011
Posts: 233

PostPosted: Thu Jan 30, 2014 11:36 pm    Post subject: Reply with quote

Maybe L/B still works after all Smile

1. deleted both ppp0 and ppp1 interfaces from the load balancer.
2. disabled load balancer.
3. (probably not related) brought down both interfaces.
4. re-added ppp0 and ppp1 to the LB
5. re-enabled LB.

Now, after manually adding a dozen of segments to a couple of multisegment downloads, each of whom was going at 634 KB/s, I managed to push total speed to about 840-960 KB/s. This is reliable proof that load balancing is working, but unfortunately not as good as previously when it was always at 1.2 MB/s even with just 2 segments or 2 files going on. Sad
Back to top
View user's profile Send private message
fulvio
Site Admin


Joined: 01 Nov 2006
Posts: 1077

PostPosted: Fri Jan 31, 2014 4:14 am    Post subject: Reply with quote

Hi,
I hope to be able writing a document to illustrate when using bonding makes sense. Now you could look at the video http://www.youtube.com/watch?v=hp7Rv2tevWk where VPN bonding has been used to increase L2 bandwidth beween two sites.
If you are thinking that

Regards
Fulvio
Back to top
View user's profile Send private message Send e-mail
DrmCa



Joined: 12 Apr 2011
Posts: 233

PostPosted: Fri Jan 31, 2014 2:44 pm    Post subject: Reply with quote

I don't really want to use bonding.
The only thing I want is to load balance.
But if it takes manually adding 10+ segments for LB to work, it's same as not working at all Sad

I don't understand why LB stopped working after downloading bonding module and why it was not restored after removing the module and rebooting the router.

Before I did that, it was sufficient to start a multi-segment d/l in Firefox with DownThemAll add-on and it would immediately go to 1.2 MB/s. Now it's a torture.
Back to top
View user's profile Send private message
fulvio
Site Admin


Joined: 01 Nov 2006
Posts: 1077

PostPosted: Fri Jan 31, 2014 4:39 pm    Post subject: Reply with quote

Your issue is unrelated with the installation of weighted bonding. The net balancer works without using the bonding module.
Regards
Fulvio
Back to top
View user's profile Send private message Send e-mail
DrmCa



Joined: 12 Apr 2011
Posts: 233

PostPosted: Fri Jan 31, 2014 4:51 pm    Post subject: Reply with quote

Yes, it logically should be unrelated, but it started exactly the moment I installed the module and was not fixed by removing it. I am still waiting for any ideas as to why LB, which was working fine since I booted into new v.3 and up until I installed bonding module is not working so well anymore. To add insult to injury, this occurred right after I finally installed ZS onto a hard drive after booting from CDROM for years.

Why is it not possible to flip default route every time a TCP connection was established or transferred X number of bytes? Or simply flip default route every second. I watch the LB logs and don't see default route changing all that often - only when I really go out of my way to create many downloading connections then it sometimes changes and download load balances.

This is very tiresome and frustrating experience from a function that is supposed to just work transparently, because my router configuration never changes. It is still the same as when I first installed 1.0b14 - same interfaces, same DSL credentials, same provider, only a couple of FW rules were added that apply only to a small subset of LAN IPs and I am not on those IPs.
Back to top
View user's profile Send private message
DrmCa



Joined: 12 Apr 2011
Posts: 233

PostPosted: Sat Feb 01, 2014 1:59 pm    Post subject: Reply with quote

Last night I attached the hard drive from the existing router machine with P4 2.2 ghz and 512 mb ram to another machine with P4 2.7 ghz and 2 gb ram and tried to d/l the same 2 files as above.

Downloads started 1-2 seconds apart and load balanced without me having to add segments to one of them. So I thought it was a memory issue that I just solved by moving into a bigger box. Not so fast!

This morning there is no LB anymore. The same two downloads share one connection now no matter how many segments I start.
This was simply maddening.

And then I added another download. Sudddenly they load balanced. This was 10th connection for crying out loud.
Then I stopped them and started just the last two files. Load balancing 2 connections. I am dumbfounded by this behavior.
So once I push it over board by adding extreme numbers of download segments, LB kicks in... This is probably why my family members using uTorrent told me that it still load balanced all this time, but my Firefox downloads with DownThemAll did not: uTorrent opened lots of connections, while Firefox's plugin opened only 1 per file and I manually added a few more.

One of the files is Fedora 19 DVD ISO image from fedoraproject.org. This file seems to be incompatible with the rest. Their server does not allow more than 1 download stream, maybe that's why?

The other 2 are Ubuntu Studio 13 image and PCBSD 10 image. These 2 allow any number of connections and they load balance immediately. Should LB depend on whether server allows re-get/more than 1 connection???
Back to top
View user's profile Send private message
fulvio
Site Admin


Joined: 01 Nov 2006
Posts: 1077

PostPosted: Sat Feb 01, 2014 3:21 pm    Post subject: Reply with quote

The Net Balancer use round-robin to distribute the connections on the gateways so if you open only a few connections there is no guarantee that all lines are used, but if you generate a lot of connections then it's statistically more likely that all the WAN links are used equally.
To use the full capacity of your Internet accesses also with only one connection, you should use VPN Bonding, but in this case you should have a external peer with wide bandwidth.

Regards
Fulvio
Back to top
View user's profile Send private message Send e-mail
DrmCa



Joined: 12 Apr 2011
Posts: 233

PostPosted: Sat Feb 01, 2014 7:10 pm    Post subject: Reply with quote

I think we should put VPN behind us as this clearly is not going to happen. I don't know anyone would provide me with VPN, so LB is the only method of using 2 DSL efficiently.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group