Update: as per suggestion from freenode/#freebsd I tried running pfsense. The thought was that it´s probably a driver issue. I get the same speed and I guess Im going for openbsd then. Shame though. Still odd that I would get the same low exact same speed with two different kinds of interfaces though.
So I recently got 100Mbit fiber at home. For someone like me who has poor health this is a godsend upgrade since its rather cheap at around 12 Euros/month with the possibility to upgrade to 1Gbit for 22 Euros per month. Celebrating this I decided to upgrade my longtime Tomato router which has functioned superbly and decided to get the Asrock C2550D4I sporting two i210 intel NICs + another intel NIC CT 9301CT.
The install worked beautifully, in the 10 years or so since I used this last it´s improved a lot and everything went like a breeze. However when I try to FTP things from ftp.sunet.se (1mS no packet loss) I only get ~6.66MiB/S instead of the 10 I get from Windows. I even installed OpenBSD on the same machine and also get 10 there too. So, since I usually do my homework fairly well I checked out https://wiki.freebsd.org/NetworkPerformanceTuning and https://calomel.org/freebsd_network_tuning.html. The latter seems about the same as the first with a more thorough explanation and propositions at which value to set things. This gains me slight increase landing me at 7.5MiB/s. The FTP program takes around 18% CPU on one of the cores. I have also tried ncftp (as opposed to the default client). I also tried all 3 NICs.
If I let
/boot/loader.conf
/etc/rc.conf
/etc/sysctl.conf
Edit: here´s my ifconfig em0.
Output from vmstat -i:
I really hope we can get this working I guess I could use another OS but I would -really- like to use FreeBSD. The other BSD´s don't attract me much and Linux.. well no thanks.
So I recently got 100Mbit fiber at home. For someone like me who has poor health this is a godsend upgrade since its rather cheap at around 12 Euros/month with the possibility to upgrade to 1Gbit for 22 Euros per month. Celebrating this I decided to upgrade my longtime Tomato router which has functioned superbly and decided to get the Asrock C2550D4I sporting two i210 intel NICs + another intel NIC CT 9301CT.
The install worked beautifully, in the 10 years or so since I used this last it´s improved a lot and everything went like a breeze. However when I try to FTP things from ftp.sunet.se (1mS no packet loss) I only get ~6.66MiB/S instead of the 10 I get from Windows. I even installed OpenBSD on the same machine and also get 10 there too. So, since I usually do my homework fairly well I checked out https://wiki.freebsd.org/NetworkPerformanceTuning and https://calomel.org/freebsd_network_tuning.html. The latter seems about the same as the first with a more thorough explanation and propositions at which value to set things. This gains me slight increase landing me at 7.5MiB/s. The FTP program takes around 18% CPU on one of the cores. I have also tried ncftp (as opposed to the default client). I also tried all 3 NICs.
Iperf
localhost:
Code:
iperf -c localhost
------------------------------------------------------------
Client connecting to localhost, TCP port 5001
TCP window size: 47.8 KByte (default)
------------------------------------------------------------
[ 3] local 127.0.0.1 port 56147 connected with 127.0.0.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 13.1 GBytes 11.2 Gbits/sec
If I let
iperf
run for a few hours I get half that BTW, works fine after restarting the server though. /boot/loader.conf
Code:
hw.igb.max_interrupt_rate="32000"
net.inet.tcp.tcbhashsize="65536"
kern.ipc.nmbjumbop="246339"
Code:
ifconfig_em0="10.0.0.3 netmask 255.255.255.0"
defaultrouter="10.0.0.1"
Code:
dev.igb.0.fc=0
dev.igb.1.fc=0
dev.em0.0.fc=0
kern.ipc.maxsockets=25600
kern.maxfiles=500
net.inet.ip.redirect=0
net.bpf.optimize_writers=1
kern.random.sys.harvest.ethernet=0
kern.random.sys.harvest.point_to_point=0
kern.random.sys.harvest.interrupt=0
net.inet.raw.maxdgram=9216
net.inet.raw.recvspace=9216
Edit: here´s my ifconfig em0.
Code:
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
ether 68:05:ca:23:8a:5e
inet 10.0.0.3 netmask 0xffffff00 broadcast 10.0.0.255
inet6 fe80::6a05:caff:fe23:8a5e%em0 prefixlen 64 scopeid 0x1
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
Output from vmstat -i:
Code:
interrupt total rate
irq23: ehci0 1668 19
cpu0:timer 11415 134
irq256: em0:rx 0 109311 1286
irq257: em0:tx 0 64067 753
irq258: em0:link 2 0
irq270: ahci1 3857 45
irq272: ahci3 168 1
cpu1:timer 30727 361
cpu3:timer 24518 288
cpu2:timer 11448 134
Total 257181 3025