Our clients are using Centos 7.1 and 7.3. They are two 10GB card bonded to make a 20GB link. Each of the network card is connected to a pair of Cisco N5000 switch. While running cp or iperf, I can see that sometimes the traffic only flows through one interface so we can only achieve 10GB. Other times it flows through both interface and we get 20GB.
It's not a faulty NIC or cable because I've tested a few servers and they all exhibit the same behaviour.
The iperf between two clients on the same switch / subnet.
# for i in {1..10}; do iperf -c 172.16.15.19 -l 1M -P 16 -t 300| grep SUM; done
[SUM] 0.0-300.0 sec 344 GBytes 9.84 Gbits/sec
[SUM] 0.0-300.0 sec 344 GBytes 9.84 Gbits/sec
[SUM] 0.0-300.0 sec 344 GBytes 9.84 Gbits/sec
[SUM] 0.0-300.0 sec 344 GBytes 9.84 Gbits/sec
[SUM] 0.0-300.0 sec 344 GBytes 9.83 Gbits/sec
[SUM] 0.0-300.0 sec 688 GBytes 19.7 Gbits/sec
[SUM] 0.0-300.0 sec 344 GBytes 9.85 Gbits/sec
[SUM] 0.0-300.0 sec 344 GBytes 9.84 Gbits/sec
[SUM] 0.0-300.0 sec 344 GBytes 9.83 Gbits/sec
[SUM] 0.0-300.0 sec 688 GBytes 19.7 Gbits/sec
Here's the bond settings
DEVICE=bond1
ONBOOT=yes
NETBOOT=yes
TYPE=Ethernet
HOSTNAME=removed
BOOTPROTO=static
IPADDR=172.16.15.18
NETMASK=255.255.255.0
GATEWAY=172.16.15.1
DNS1=10.1.1.71
DNS2=10.1.1.70
MTU=9000
BONDING_MASTER=yes
BONDING_OPTS="mode=4 miimon=100 xmit_hash_policy=layer3+4"
Here's the eth settings. Only posted one as they are identical apart from the eth name.
BOOTPROTO=none
TYPE=Ethernet
NAME=eth16
DEVICE=eth16
ONBOOT=yes
MTU=9000
MASTER=bond1
SLAVE=yes
Here are the settings for both Cisco N5000.
interface port-channel3008
description <removed>
switchport access vlan 3900
vpc 3008
interface Ethernet103/1/31
description <removed>
switchport access vlan 3900
channel-group 3008 mode active