# Bandwidth Drops After Restarting Network



## fast-forward (Feb 16, 2021)

Hey Community,

I have a dedicated server at Hetzner:

Intel Xeon E3-1245    
PLUSNIC 1 Gbit
Intel 82574L
HDD2x HDD SATA 3,0 TB Enterprise
Memory 4x 4096 MB DDR3 ECC

Installed is a FreeBSD 12.2

I have noticed that I am losing bandwidth by a factor of 3 by Downloading 1GB File by using scp.
Normally it shows 20mb/s for the first second but after some time downloading it over and over again
it shows 1mb/s for the first second. After downloading the whole 1 GB the difference is: 30mb/s vs 11mb/s

This happens either with time, or immediately after I restarted the network with:
service netif restart && service routing restart

I have no idea what is causing this. Any ideas?

Best Regards,
fast-forward


----------



## fast-forward (Feb 16, 2021)

Here some Tests, same Hardware:

FreeBSD Download Link:

wget http://78.46.91.155/1GB.1.bin

Ubuntu Linux Download Link

wget http://88.198.7.90/1GB.1.bin

FreeBSD:  First 2-3 Seconds: 0% 1.99M  1.22MB/s
Ubuntu: First 2-3 Seconds: 3% 38.01M  23.6MB/s

Same Hardware @Hetzner but different Download Rate

:-(

fast-forward


----------



## fast-forward (Feb 16, 2021)

I've removed the ifconfig_em0_ipv6 setting and currently all is fine. But why ?


```
keymap="de.kbd"
ifconfig_em0="inet 78.46.91.155 netmask 0xffffffe0"
defaultrouter="78.46.91.129"
# ifconfig_em0_ipv6="inet6 accept_rtadv"
sshd_enable="YES"
ntpd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
```


----------



## fast-forward (Feb 16, 2021)

No, Download-Rate has dropped now (


----------



## SirDice (Feb 16, 2021)

Try turning off LRO and TSO on em0, `ifconfig em0 -lro -tso`.


----------



## CyberCr33p (Feb 16, 2021)

I download these files from a Hetzner EX42 server and I got 112MB/s from both (I have IPv6 disabled). Did you check if you have good speed from freebsd rescue mode?


----------



## fast-forward (Feb 16, 2021)

When I wait for the download to complete, the difference is currently for my last test 
21mb/s (FreeBSD) to 28mb/s (Linux).

But the first seconds the Linux machine has already loaded 7% and BSD 0%.

The short-term data throughput is higher. For a website that provides video content this seems important to me.

Already tried to turn off LSO and TSO `ifconfig em0 -lro -tso` nothing has changed.


----------



## fast-forward (Feb 16, 2021)

see the Screenrecording: http://78.46.91.155/screenrecording.mp4 of my wget requests


----------



## SirDice (Feb 16, 2021)

Make sure to limit your downloads to IPv4. If I recall correctly Hetzner does something odd with regards to the way they implemented IPv6. So rule this out by forcing wget/curl/fetch to use IPv4.


----------



## fast-forward (Feb 16, 2021)

When I load the BSD-file from Linux Box I also have a constant 112mb/s.
Have changed the ISP also constant 23mb/s

But with my ISP it works only with Linux but not with FreeBSD as long as I reboot the BSD Box.
Crazy


----------

