OPNsense Forum

English Forums => Hardware and Performance => Topic started by: guest29664 on July 07, 2021, 01:30:21 am

Title: Very slow through put
Post by: guest29664 on July 07, 2021, 01:30:21 am
I just installed opnsense on my network and configured it the best way I know how. I have noticed that when I test the speed though I'm only getting about 80Mbps through the Firewall and when I test without I'm getting about 420Mbps. I am not seeing any spikes of RAM or CPU at all. Please see the stats below. This is on a Dell Optiplex 3050 mini with the WAN interface as the ethernet outlet on the computer and the LAN is on a 3.0 USB to ethernet adapter. Any help would be very appreciated.

CPU usage   
2 %
State table size   
0 % ( 296/378000 )
MBUF usage   
0 % ( 1276/234388 )
Memory usage   
10 % ( 391/3780 MB )
SWAP usage   
0 % ( 0/8192 MB )
Disk usage   
0% / [ufs] (1.8G/442G)
Title: Re: Very slow through put
Post by: oneplane on July 07, 2021, 02:15:56 am
Seems like your LAN is running at 100Mbit, not 1Gbit.
Title: Re: Very slow through put
Post by: guest29664 on July 08, 2021, 12:47:09 am
I have the LAN speed and duplex set to 1000 baseT duplex, Master
Title: Re: Very slow through put
Post by: lewald on July 08, 2021, 01:57:26 pm
..outlet on the computer and the LAN is on a 3.0 USB to ethernet adapter.


What kind of chipset is the USB to Ethernet Adapter. Some of these devices are not currently well supported in FreeBSD bring only 80 Mbit.
Title: Re: Very slow through put
Post by: testo_cz on July 09, 2021, 12:09:56 am
..outlet on the computer and the LAN is on a 3.0 USB to ethernet adapter.


What kind of chipset is the USB to Ethernet Adapter. Some of these devices are not currently well supported in FreeBSD bring only 80 Mbit.

@lewald good point....

@Computermaster21
usbconfig command should show the param speed=SUPER ... aka 5Gbps  for this USB NIC. If not, then the NIC has got USB speed cap.

Actually I was testing some setup with my USB 3 NIC recently. Its axge(4) . Got weak results as the NIC never reached 400Mbits. I also suspect  XHCI in my older mini PC combined with the NIC and with the current drivers.
Feels like these setups are never gonna be the best solution.

BTW: your Optiplex has probably got Realtek LAN chipset. These are not the best choice either.

Its tedious job but I suggest to iperf3 benchmark both NICs/interfaces separately wrt another computer at the same network segment and see what speeds they are able to achieve in either direction. Observe CPU resources consumption, e.g. top -aSHP, during these iperf3 tests. Generally,  a badly selected NIC takes too much resources and as a consequence it throttles system to be able to happily route/firewall network traffic at high speeds.

Update: my USB NIC is ASIX based, so axge(4)
Title: Re: Very slow through put
Post by: guest29664 on July 09, 2021, 01:26:21 am
Here is the link for the adapter I have.
https://www.cablematters.com/pc-447-138-usb-30-to-gigabit-ethernet-adapter.aspx
Title: Re: Very slow through put
Post by: guest29664 on July 09, 2021, 01:29:38 am
I am showing that it is a speed=SUPER 5.0Gbps
Title: Re: Very slow through put
Post by: guest29664 on July 09, 2021, 11:55:20 pm
Would it be easier for me to just bypass the onboard ethernet slot and just buy another 3.0 adapter and just use that for inbound and outbound? Does anybody else have any recommendations?
Title: Re: Very slow through put
Post by: testo_cz on July 10, 2021, 08:40:55 am
I am showing that it is a speed=SUPER 5.0Gbps

Nice. That Is what you need.

Are gonna iperf3 benchmark the NIC ?
Title: Re: Very slow through put
Post by: oneplane on July 12, 2021, 03:13:55 am
That is the link speed but not the speed at which the interface actually operates. Same for the ethernet link speed.

If the chipset can only do around 90Mbit/s (which happens a lot with USB 3 "gigabit ethernet" adapters), it doesn't matter that the USB link says 5Gbps and the ethernet link says 1000Mbps.

USB Ethernet adapters can be very hard to check, especially since a lot of vendors make bad USB drivers for FreeBSD, and some don't make any drivers at all so they have to be reverse-engineered to work, which isn't ideal.

Maybe there is an easy way to test if the chipset is even capable of running that the full link speed, you can plug it in to a computer running Windows, macOS or Linux and see if you can saturate the link there. If that works, we know for sure that at least the chip in the adapter works correctly.
Title: Re: Very slow through put
Post by: guest29664 on July 14, 2021, 01:22:17 am
Yes I had a bad feeling that these USB adapters may not cut it so I think what I'm going to do is I'm going to switch it to a midsize PC that has a slot for a NIC card. Thank you guys for all your help I really appreciate it.