LACP performance problem

Status
Not open for further replies.

el_pedriyo

Explorer
Joined
Jun 24, 2018
Messages
65
Hello,

I am currently having a problem with the network I am trying to build, I am currently using a 4gbps ethernet card with 4 ports in LACP setup in my freenas server, and my desktop computer with 2 ethernet ports of 1gbps each, ending in 2gbps in total, and in the middle of both I currently have an smart pro netgear switch.
The problem that am I currently facing is that I am not being able to hit the 2gbps in my PC when I want to transfer a file from my NAS to my PC, I am only able to hit 1gbps. If during the meantime I want to download to my pc anything else from where else I am able to hit the 2gbps lagg, so I assume that my pc is fine with the 2gbps lagg. And if I want to download from the server from more than 1 pc it also hits the 2gbps in the freenas server network card, so I will assume that the lagg is also working there.
I tried also using 2 different protocols like samba and ftp at the same time with 2 files in my desktop pc, but the same, only 1gbps was hitted. But what makes it strange is that if I want to download something from the NAS and also from a VM inside the NAS, in that case, I am able to hit the 2gbps, its like when I download from 2 different ips it hits the 2gbps of the lagg.

Does anyone guess why is this happening and what could be the problem?

Kind regards
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
This is just how Lagg works. You get aggregate bandwidth over many connections but not for one.
 

el_pedriyo

Explorer
Joined
Jun 24, 2018
Messages
65
The is not way to make it over 1 connection?
Also connections refering to different hosts I assume, as like I said I tried with samba and FTP at the same time (2 connections) and it didn't work neither
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
The issue is packet re-assembly. If you transfer packets over more than one NIC, at the receiving end, it needs to re-assemble those packets to make the finally transferred whole, but there's no guarantee that over multiple links that they will all arrive in the correct order and that some will not be delayed, which would mean the system has to buffer and wait before processing the next packet. It also takes a lot of system resources to keep track of all that across multiple NICs (since the NIC itself can't offload that job as it's only one NIC, not all of the involved NICs), so most operating systems opted not to offer this type of connection (leading to nobody offering it as there's nobody to connect to). Such link aggregation options do exist, but are usually hardware-based (and quite expensive).
 

Turgin

Dabbler
Joined
Feb 20, 2016
Messages
43
The is not way to make it over 1 connection?
Also connections refering to different hosts I assume, as like I said I tried with samba and FTP at the same time (2 connections) and it didn't work neither

Depending on the load balancing algorithm used those two connections would need to be from different source addresses. There is a post somewhere here that explains it well, but link aggregation simply doesn't work like we all wish it did. You'll see the biggest throughput benefit when the scenario is many clients to one destination where the destination is using link aggregation. IMO, the primary reason for using link aggregation is redundancy when using things like Cisco VPC where the port channel is spread across two (or more) physical switches and provides link redundancy to the server or whatever.
 
Joined
Dec 29, 2014
Messages
1,135
Not to pick too many nits, but LACP is just how each side decides to add links to a bundle. How the bundle is used once links are added to it is an entirely different thing. First off speaking as a networking person, LACP = good. Links aren't added to a bundle until both sides complete some negotiation indicating they are both ready to handle the packets. If you force things on, you could be sending packets down a link that isn't ready to receive them. Sorry, enough lecturing there.

The load balancing there is working as designed. I am had a discussion with another poster about linux having a driver that would massage the MAC addresses on outbound to try and fool the switch(es) to get multiple channels in play. That theory doesn't work unless you can do it on both sides, so IMHO it has minimal value. In switches, the general use a channels/LAGG's is to distribute/load balance conversations across different links so you get an overall effective bandwidth of all the links in the bundle. Each individual conversation is assigned to a single link (possibly different on each side depending on the hashing method configured). I guess all of that just says it won't do what you are trying to do. The good news would be you SHOULD be able to get an effective bandwidth off the NAS of 1G each to 4 individual clients at the same time.
 
Status
Not open for further replies.
Top