Intel 2.5GB NICs & Switch => abismal 275 Mbits/sec iperf

chadilac

Dabbler
Joined
Dec 27, 2022
Messages
24
I just installed an Intel i225-v 2.5GB NIC in my TrueNAS box. I have cat 5e cable to a TrendNet unmanaged 2.5GB switch, then cat 5e back to my PC with a TrendNet 2.5GB USB ethernet adapter.

iperf is giving terrible results and those speeds are also what I'm seeing in SMB transfer from my windows PC to the TrueNas share.

Code:
iperf.exe -V -c 192.168.0.45 -P 1 -i 1 -p 5001 -f m -t 10
------------------------------------------------------------
Client connecting to 192.168.0.45, TCP port 5001
TCP window size: 0.20 MByte (default)
------------------------------------------------------------
[  3] local 192.168.0.157 port 53886 connected with 192.168.0.45 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec  32.8 MBytes   275 Mbits/sec
[  3]  1.0- 2.0 sec  32.8 MBytes   275 Mbits/sec
[  3]  2.0- 3.0 sec  33.4 MBytes   280 Mbits/sec
[  3]  3.0- 4.0 sec  33.4 MBytes   280 Mbits/sec
[  3]  4.0- 5.0 sec  32.2 MBytes   271 Mbits/sec
[  3]  5.0- 6.0 sec  32.6 MBytes   274 Mbits/sec
[  3]  6.0- 7.0 sec  32.9 MBytes   276 Mbits/sec
[  3]  7.0- 8.0 sec  32.8 MBytes   275 Mbits/sec
[  3]  8.0- 9.0 sec  32.8 MBytes   275 Mbits/sec
[  3]  9.0-10.0 sec  32.6 MBytes   274 Mbits/sec
[  3]  0.0-10.0 sec   328 MBytes   275 Mbits/sec


1673930759637.png


I see support for this NIC was included in 12.0-U8, however, I don't see the driver if_igc.ko in the /boot/kernel or the /boot/modules directories. But TrueNas core does recognize it as 2.5GB
1673931509074.png


Loaded drivers:
Code:
root@truenas[/boot/modules]# kldstat
Id Refs Address                Size Name
 1  113 0xffffffff80200000  23c08e0 kernel
 2    1 0xffffffff825c1000   224328 if_qlxgbe.ko
 3    1 0xffffffff827e6000    a7cf8 ice_ddp.ko
 4    1 0xffffffff8288e000   5a2c28 openzfs.ko
 5    1 0xffffffff82e31000    11968 ipmi.ko
 6    3 0xffffffff82e43000     3cb0 smbus.ko
 7    1 0xffffffff82e47000   11bac0 hpt27xx.ko
 8    1 0xffffffff82f63000    859a0 ispfw.ko
 9    1 0xffffffff82fe9000    9ce58 hptrr.ko
10    1 0xffffffff83086000    839c8 hptnr.ko
11    1 0xffffffff8310a000    175b8 if_atlantic.ko
12    1 0xffffffff83122000    32cf8 if_bnxt.ko
13    1 0xffffffff83518000     3250 ichsmb.ko
14    1 0xffffffff83600000   53e438 vmm.ko
15    1 0xffffffff8351c000     21cc nmdm.ko
16    1 0xffffffff8351f000    3de40 ctl.ko
17    1 0xffffffff8355d000     2268 dtraceall.ko
18    9 0xffffffff83560000     8a60 opensolaris.ko
19    9 0xffffffff83569000    372f8 dtrace.ko
20    1 0xffffffff835a1000     2274 dtmalloc.ko
21    1 0xffffffff835a4000     2cb8 dtnfscl.ko
22    1 0xffffffff835a7000     3331 fbt.ko
23    1 0xffffffff83b3f000    55570 fasttrap.ko
24    1 0xffffffff835ab000     2258 sdt.ko
25    1 0xffffffff835ae000     91b4 systrace.ko
26    1 0xffffffff835b8000     91b4 systrace_freebsd32.ko
27    1 0xffffffff835c2000     234c profile.ko
28    1 0xffffffff835c5000     589c geom_multipath.ko
29    1 0xffffffff835cb000    11624 hwpmc.ko
30    1 0xffffffff835dd000    16438 t4_tom.ko
31    1 0xffffffff835f4000     20f0 toecore.ko
32    1 0xffffffff835f7000     2a08 mac_ntpd.ko


Anyway you slice it 0.275GB is waaaay under 2.5GB. I'm a network noob. What am I missing? How can I troubleshoot further? Can I create a direct Windows PC to TrueNas box network connection without the use of a router to test a direct connection?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
If you have a PCIe 2.5Gbps card on one side and a USB 2.5Gbps dongle on the other side, with a switch in between, you really only have a few possibilities. One is that the USB dongle sucks, could be a Realtek chip. That's unfixable. Another is that the USB is running at USB 2, which is theoretically 480Mbit/sec, but in practice is more like 300-ish. "Hmm." You should also check the link speed of the USB dongle to the switch.

Of course you can directly connect the two ethernet devices to do a direct test as well.
 

chadilac

Dabbler
Joined
Dec 27, 2022
Messages
24
If you have a PCIe 2.5Gbps card on one side and a USB 2.5Gbps dongle on the other side, with a switch in between, you really only have a few possibilities. One is that the USB dongle sucks, could be a Realtek chip. That's unfixable. Another is that the USB is running at USB 2, which is theoretically 480Mbit/sec, but in practice is more like 300-ish. "Hmm." You should also check the link speed of the USB dongle to the switch.

Of course you can directly connect the two ethernet devices to do a direct test as well.
Hmmm, yes I think the dongle is RealTek, I'll check. And I will Google around about how to check if it's running usb2 vs 3 and how to create a direct network connection between the win PC and TrueNas. I vaguely remember years ago the concept of an ad-hoc network with win PCs.
 

chadilac

Dabbler
Joined
Dec 27, 2022
Messages
24
The client PC usb 2.5GB ethernet dongle by TRENDNet has a RealTek chip (couldn't confirm which one), but still, this is like 1/3 the expected transfer rate...it shouldn't be THAT bad...must be something else, right?

Wrong. I had a 1GB usb dongle laying around, it gets 925Mbits/sec.

I called TrendNet, they had me try various things. I tried various things including installing the most recent RealTek drivers from their website directly all to no avail. They said it was defective. Returning and trying another one from CableMatters that has the updated rtl8156b chip. Hopefully it is better.
 
Joined
Oct 22, 2019
Messages
3,641
Returning and trying another one from CableMatters that has the updated rtl8156b chip.
Those chipsets aren't so good.

Hopefully they send you one with rtl8156bg, as it appears to give people the best results. (Which doesn't mean much.)
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
The client PC usb 2.5GB ethernet dongle by TRENDNet has a RealTek chip (couldn't confirm which one), but still, this is like 1/3 the expected transfer rate...it shouldn't be THAT bad...must be something else, right?
I once needed to use a USB NIC (i.e. Realtek) to test out a custom router config (pfSense) for my ISP, to support their IPTV platform. Spent hours trying to get things to work, but they just wouldn't and I couldn't tell why.
When the Intel PCIe NIC I'd ordered finally arrived, IPTV worked instantly. I was doing everything right, the NIC was just that bad. It couldn't handle a bit of IGMP without crapping out.
Realtek has given me zero reason to think they've improved, as can be seen by the numerous threads on these forums that boil down to "Yeah, Realtek 2.5GbE NICs are a bit of a farce".
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
True, but the 2.5GbE ones are the symbol that nothing has improved. They could've worked towards a better NIC, but didn't.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
True, but the 2.5GbE ones are the symbol that nothing has improved. They could've worked towards a better NIC, but didn't.

Seriously, @Ericloewe , that's like blaming McDonald's for the quality of their hamburgers. You're just not GOING to get a high quality burger for a buck and a half. The good ones are ten times the cost. The reason the McDonalds's ones exist is because of market demand for the substandard product. Nobody is going to go out and buy a half dozen cheeseburgers for the kids if it is going to cost a hundred dollars.

In a similar manner, the PC world is full of components that are just barely sufficient to the job. Gigabyte, ASUS, MSI, and AsRock each compete to make the lowest cost mainboards, and a lot of this happens by buying the cheapest components that could be deemed passable for the job. It doesn't have to do it WELL. It just has to be able to load a web page, or some OS updates.
 
Top