0

I have a box with two 1Gb NIC's in it, bonded. The type of bonding is "per connection" so each connection goes "to 1 nic" but if a process has multiple connections, it will share the bonded NIC's and "use both".

I have an NFS mounted storage.

When I read/write to the mounted storage, it appears to "max out" speed wise at exactly 1Gb/s. So I am presuming that it is using "one" of the NIC's, despite two being there, and bonded.

Is there an easy way to have NFS use "both" of bonded NIC's in this configuration?

rogerdpack
  • 577
  • 2
  • 8
  • 23
  • 2
    You really do not want a single flow spread across multiple NICs because that could actually degrade the throughput. You will get out-of-order packet delivery, and that can cause requests for packets already sent, it will also cause the receiver to need to reorder data (TCP), or ignore late packets (UDP). It will absolutely kill real-time protocols, e.g. VoIP or video. – Ron Maupin Dec 04 '18 at 16:57
  • More generally, I guess what I'm wondering is "is there a way to get NFS to use 2 nic cards", you know, increased performance... – rogerdpack Dec 04 '18 at 17:03
  • 1
    If you want more bandwidth for a single flow than a single NIC provides, then you really need to get a faster NIC. Bonding the NICs will, in aggregate, give you more bandwidth, but only for multiple flows. There is a hash algorithm that determines which flow uses which NIC. – Ron Maupin Dec 04 '18 at 17:05
  • 1
    You can also select which hash algorithm is used to determine what flows go where (based on source/destination-mac/ip), but as soon as you go about "disassembling" a flow across multiple fabrics and reassembling it on the other side, the overhead outweighs any benefits. – Spooler Dec 04 '18 at 17:12
  • 1
    Unrelated to the bonding question, what type of connection does the NFS server have? If the NFS server is also using 1GB interfaces you really aren't going to be able to do much with bonding. – Zoredache Dec 04 '18 at 18:23
  • See also https://serverfault.com/questions/900582/bonding-rr-vs-single-10g-for-nfs-nas-pros-and-cons – rogerdpack Jun 11 '21 at 18:46

1 Answers1

1

Not with one client. One client will always use exactly one connection and this connection will always go through one interface only. Several clients will use more than 1 Gbps of throughput, though.

The only way to go over the 1Gbps limit is by using the round-robin bonding mode on both sides (client and server). This can actually reach 2 Gbps, however it won't scale well with more than 2 NICs and generates lots of lost packets and collisions.

wazoox
  • 6,918
  • 4
  • 31
  • 63
  • 1
    balance-rr will *report* that it can do 2Gbps, but the chances of reaching 1Gbps are typically low in just about any real-world condition. In most cases, it's a net loss in performance. – Spooler Dec 04 '18 at 18:14
  • @Spooler it really depends. On small networks I've tested again and again NFS over tcp transfers actually reaches 150/160 MB/s. But I wouldn't recommend it. – wazoox Dec 05 '18 at 17:59