LACP NFS performance confusion

Background Info:

So I have an Ubuntu 14.04 server (1 gigabit nic) and a NAS (Synology DS1815+, 4 gigabit nics). I am maxing out the gigabit line between by Ubuntu 14.04 server and my network regularly. Most but not all of that traffic is to the NAS. The NAS is mounted as a NFS share on the Ubuntu 14.04 server.

I just purchased a USB 3.0 dual gigabit nic adapter (hasn't arrived yet). My plan is to connect the adapter to the server and connect both nics to the NAS. This will serve as a direct connection between the NAS and the server. The NAS officially supports LACP and so does the USB nic adapter.

Questions:

I am trying to understand LACP and how it relates to NFS. I understand LACP doesn't simply double the bandwidth, but I am not sure I grasp how the balancing works with NFS. Relating to transfers between the NAS and server over the dedicated connection, here are my questions:

Will LACP provide any performance benefit on a single file transfer from a single NFS share? (It doesn't seem like it will from what I read but just making sure)

Will LACP provide any performance benefit on multiple simultaneous file transfers from a single NFS share?

Will LACP provide any performance benefit on multiple simultaneous file transfers from multiple NFS shares? (It seems like it would)

The NAS does not officially support balance-rr, but if it works would that be a better option than LACP?

Would another bond mode be more appropriate? (It doesn't seem like it from what I read but just making sure)

Thank you for the assistance!


Solution 1:

To answer your questions:

Will LACP provide any performance benefit on a single file transfer from a single NFS share? (It doesn't seem like it will from what I read but just making sure)

No, it will not. LACP will spread TCP sessions across NICs, and what you're describing is a single session. LACP does not stripe traffic like bond-rr does (and there are great reasons for this).

Will LACP provide any performance benefit on multiple simultaneous file transfers from a single NFS share?

No, as this is still sent through a single session.

Will LACP provide any performance benefit on multiple simultaneous file transfers from multiple NFS shares? (It seems like it would)

It can, if your NFS client is configured to spawn multiple sessions on mount. Most are (usually with a default of around eight). However, depending on you LACP algorithm this may not be the case. Some algorithms spread connections based on MAC address (meaning a single NIC from a client will never connect to more than one NIC on the server) or by session, which will allow this kind of traffic to spread across NICs on the server side due to multiple sessions created.

The NAS does not officially support balance-rr, but if it works would that be a better option than LACP?

It would definitely NOT be better in nearly all situations. balance-rr works fine for point-to-point connections between servers. When a switch or any other intermediary device is involved, it introduces extreme amounts of jitter, as traffic comes in on the receiving side out of order. However, it can work pretty well for inter-node point-to-point synchronization networks. That scales terribly, though, so I don't ever see it outside of three node clusters (tops).

Would another bond mode be more appropriate? (It doesn't seem like it from what I read but just making sure)

LACP is the most intelligent bond mode you could be using right now. When managed correctly, it works very well, and it handles failover quite gracefully.

If you want data striping across network links with a single "session", multipathing with iSCSI does this very well. GlusterFS is also much more capable of spreading traffic around in a way that LACP needs to perform well, and it behaves similarly to NFS. You really can't beat the simplicity of NFS, though.