5

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!

Alec Fenichel
  • 195
  • 1
  • 2
  • 10

1 Answers1

6

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.

Spooler
  • 7,046
  • 18
  • 29
  • So would balance-rr be a good setting for the direct connection between the server and the NAS? Both will also be connected to my network on a separate connection that is not balanced. – Alec Fenichel Sep 28 '16 at 03:24
  • In theory, sort of. Balance-rr is usually only run in *some* configurations as a method of making a fat point-to-point pipe. However, network accessible filesystems have a really hard time dealing with jitter. SMB is way worse, but NFS suffers as well. What you'll get is very unpredictable performance when you start to move anything more than one big file at a time. It's actually not a terrible idea with DRDB deployments, as that can handle the jitter much better. However, it still scales really badly and is not as graceful as a multi-session friendly protocol over LACP. Or multipathing. – Spooler Sep 28 '16 at 04:30
  • I see. I'm not sure what would be best. Should I not use balancing and just separate the interfaces? I could split my NFS share into 2 NFS shares and mount each on a separate interface, however, this would be very poorly balanced. I could also split my NFS share into 2 NFS shares and use LACP. The NFS share is for large files so balance-rr might be okay. However, I frequently have multiple simultaneous transfers going in each direction. I think I need to stick with NFS as it will be to difficult to change. Thanks! – Alec Fenichel Sep 28 '16 at 13:16
  • How can I check or instruct my Linux client to mount an NFS share with more than one connection? Is it possible? The only reference I found was on `man nfs`: "Roughly speaking, one socket is used for each NFS mount point. If a client could use non-privileged source ports as well, the number of sockets allowed, and thus the maximum number of concurrent mount points, would be much larger." – Pablo M Dec 19 '18 at 16:59