Solved Big difference with iperf by disabling IPv6?

Hello,

With default settings (FreeBSD 10.1 fresh install):

Code:
# iperf -f M -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 0.06 MByte (default)
------------------------------------------------------------
[  4] local 192.168.1.5 port 5001 connected with 192.168.1.226 port 50533
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-30.0 sec  1030 MBytes  34.3 MBytes/sec

By disabling IPv6, /etc/rc.conf:

Code:
ip6addrctl_enable="NO"                  # New way to disable IPv6 support
ip6addrctl_policy="ipv4_prefer"         # Use IPv4 instead of IPv6
ipv6_activate_all_interfaces="NO"       # Do not automatically add IPv6 addresses

After rebooting, testing again:

Code:
iperf -f M -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 0.06 MByte (default)
------------------------------------------------------------
[  4] local 192.168.1.5 port 5001 connected with 192.168.1.226 port 50757
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-30.0 sec  3356 MBytes   112 MBytes/sec


The latter seems more in tune with the hardware (both iperf client and server have 1Gb nic, 16 GB ram, and are connected directly with Cat 7 cable).

Why is there such a big difference by disabling IPv6? Or am I missing some key aspect?
 
Why is there such a big difference by disabling IPv6? Or am I missing some key aspect?
I'm not sure. If you aren't testing over IPv6, the presence of an IPv6 configuration shouldn't matter. What brand / model of Ethernet card(s) are you using? It may be that enabling IPv6 disables some hardware offloads - a lot of older equipment doesn't have a dedicated hardware path for IPv6.

Here's a test over IPv6 on a 10.1-STABLE system:
Code:
(0:4) test2:/sysprog/terry# iperf -V -c 2610:198:1:2::61
------------------------------------------------------------
Client connecting to 2610:198:1:2::61, TCP port 5001
TCP window size: 34.9 KByte (default)
------------------------------------------------------------
[ 3] local 2610:198:1:2::9 port 55071 connected with 2610:198:1:2::61 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 10.5 GBytes 8.99 Gbits/sec
And between the same 2 systems, but using IPv4:
Code:
(0:5) test2:/sysprog/terry# iperf -c 204.141.35.61
------------------------------------------------------------
Client connecting to 204.141.35.61, TCP port 5001
TCP window size: 35.0 KByte (default)
------------------------------------------------------------
[ 3] local 204.141.35.9 port 24729 connected with 204.141.35.61 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 11.5 GBytes 9.89 Gbits/sec
This is using Intel X540-T1 10GbE cards on both systems.
 
Hi, thank you for your remarks.

Copying some output from dmidecode

Code:
[....]
Handle 0x0001, DMI type 1, 27 bytes
System Information
   Manufacturer: Hewlett-Packard
   Product Name: HP Z620 Workstation
[....]
Handle 0x0004, DMI type 4, 42 bytes
Processor Information
   Socket Designation: CPU0
   Type: Central Processor
   Family: Xeon
   Manufacturer: Intel
  Version: Intel(R) Xeon(R) CPU E5-1650 @ 3.20GHz

These are the cards:

Code:
# pciconf -lv | grep -B3 network
em0@pci0:0:25:0:   class=0x020000 card=0x158a103c chip=0x15028086 rev=0x05 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '82579LM Gigabit Network Connection'
  class  = network
--
em1@pci0:1:0:0:   class=0x020000 card=0x158a103c chip=0x10d38086 rev=0x00 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '82574L Gigabit Network Connection'
  class  = network
 
These are the cards:
Code:
# pciconf -lv | grep -B3 network
em0@pci0:0:25:0:   class=0x020000 card=0x158a103c chip=0x15028086 rev=0x05 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '82579LM Gigabit Network Connection'
  class  = network
--
em1@pci0:1:0:0:   class=0x020000 card=0x158a103c chip=0x10d38086 rev=0x00 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '82574L Gigabit Network Connection'
  class  = network
Those are pretty recent. There are some differences between those controllers, as Intel shows here. You might try using the other interface and see if the performance is any different.

You might try asking on the freebsd-net@ mailing list. The Intel developer participates there, along with a lot of other knowledgeable people. Please post back here if your question is answered over there.
 
You were right: I removed those lines disabling IPv6, from /etc/rc.conf.

Then, trying from the second nic:

Code:
iperf -f M  -c 192.168.1.6
------------------------------------------------------------
Client connecting to 192.168.1.6, TCP port 5001
TCP window size: 0.99 MByte (default)
------------------------------------------------------------
[  4] local 192.168.1.226 port 63200 connected with 192.168.1.6 port 5001
[ ID] Interval  Transfer  Bandwidth
[  4]  0.0-10.0 sec  1122 MBytes  112 MBytes/sec

Thank you so much for pointing the right direction to me. It was quite puzzling. I am marking this as solved.
 
Back
Top