Load balancing question – d/l caps at way less than 2x speed

Home Page Forums Network Management ZeroShell Load balancing question – d/l caps at way less than 2x speed

This topic contains 3 replies, has 0 voices, and was last updated by  DrmCa 7 years, 11 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #43037

    DrmCa
    Participant

    After installing 2x dry DSL connections, 5 Mbit each, and downloading from each of them at 534 Kb/s, I created load balancing with failover and tried to d/l a large file with 4 streams. It capped at 852 Kb/s. No matter how many times I’ve tried to d/l different files from different sites, it always capped at 852 Kb/s, sometimes less, but never exceeded that number.

    That is strange as load/balanced d/l should be double the capacity of every DSL line, i.e. approximately 1068 Kb/s. The limitation of 852 is very stable and reproducible.
    The configuration I am using is Dell Optiplex GX240 machine with Pentium4 Celeron 2.2, 512MB SDRAM,
    2x PCI Intel Corporation 82557/8/9/0/1 Ethernet Pro 100 (rev 08) cards on the WAN side
    onboard 3Com Corporation 3c905C-TX/TX-M [Tornado] (rev 78) on the LAN side.
    The DSL connections are thru PT-Link 8616 DSL modems.

    Did anyone else observe similar behavior from Zeroshell Release 1.0.beta14?

    Thank you! 😀

    #51843

    atheling
    Member

    Actually I expect that based on how IP level load balancing works.

    Basically the first step in the routing decision is to lookup the route in a cache. So once a routing decision has been made for packets from your ZS box to the destination IP address all subsequent datagrams with that destination IP address will go the same way. Until, of course, the routing cache is cleared.

    This means that you don’t get any benefit by starting multiple streams for downloading files as all datagrams (and thus TCP/IP connections) will use the same gateway.

    But it also means that you can use HTTPS to communicate with a secure web site. Typically the server will detect a problem if different requests from the same user session come from different IP addresses and kick you off.

    The routing cache is cleared based on arcane logic that I haven’t been able to fully characterize. Failure of an interface will clear it. As will changing the routing rules (but not the iptable rules). And it will age out old entries based on cache size and time. That later one is the one I haven’t figured out yet.

    If you control both ends of your gateway links then you could use link bonding to get your desired effect as that load balancing takes place at a lower place in the network stack and only one gateway is presented to the IP layer.

    #51844

    DrmCa
    Participant

    @atheling wrote:

    This means that you don’t get any benefit by starting multiple streams for downloading files as all datagrams (and thus TCP/IP connections) will use the same gateway.

    How does your theory explain the fact I get 852 KB/s on the load balanced 543 KB/s DSL lines?

    #51845

    DrmCa
    Participant

    I think I got it! It just occurred to me to test the following scenario:

    1. Disable pppoe0 in load balancer, leaving pppoe1 up.
    2. Start d/l (4-way, but I don’t think it matters)
    3. Enable pppoe0.
    4. Add d/l segment. D/l rate goes immediately to 1.0 MB/s which is very close to 2×5000 Mbit/s.

    So there is something wrong with load balancer, with the way it distributes TCP connections among the pppoe interfaces.

    Another test case is as follows:

    1. Disable pppoe0 in balancer
    2. start single-segment d/l on machine #1 – speed reaches 532-534 KB/s
    3. Enable pppoe0 in balancer
    4. Start single-segment d/l on machine #2 – speed reaches 532-534 KB/s

    Simply starting two d/l on two separate machines results in 260 KB/s d/l rate on each machine.

    This is reproducible.
    Fulvio, can you have a look at the load balancing algorithm?

    #51846

    DrmCa
    Participant

    I’ve backed up the profile, wiped HDD clean and re-partitioned, then started Zeroshell and restored profile. And now magically the multi-segment d/l reaches 1 MB/s again.

    Stopped and re-started d/l a couple of times – still 1 MB/s.

    Then started one file, and then another – they together reached 1 MB/s

    Waited a little while and started one multisegment d/l again and that was it – speed dropped to 534 KB/s. Started another one – still 534.

    There is a bug in load balancer that prevents it from working for more than a handful of very first connections.

    Fulvio, can you please have a look???

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.