freifunkh / ansible-configs

Here we store all of our actual ansible hosts in freifunk hanover
2 stars 1 forks source link

Netcup Server - Limit Bandwith to less than 80 Mbit #23

Closed cawi2001 closed 6 years ago

cawi2001 commented 7 years ago

Hello, we have to limit the bandwith on our Netcup server. My idea to this:

1) Use wondershaper or 2) Having a cron, limit bandwith on the interface on 100 Mbit. Every 10 minutes we check, if the bandwith is over 80 MBit, if so, set interface on 10 Mbit for 3 Minutes and the set it to 100 MBit again. or 3) Use ethtool and set to 100baseT/Half . This will bring the transfer down on the EN :-)

Then we will not downgraded to 10 MBit for the rest of the month.

http://www.nwlab.net/tutorials/ethtool/ethtool.html

tobby88 commented 7 years ago

1.) Looks like this is more designed to prioritize TCP-ACK-Packages on slow and assymetric DSL connections - and not to limit the traffic.

2.) This may work, but it's a bad user experience...

3.) If the (virtual) network card and the virtual switch (bridge) are capable of 100baseT/Half this may work, but it will limit our traffic to <50 Mbit/s, maybe less, if there are many packet collisions because of half duplex.

My idea: Use tc to limit the traffic. https://wiki.debian.org/TrafficControl Experiment a little bit with the parameters to get the most out of it (close to 80 Mbit/s, maybe even more with short bursts). And use a peer limit so at normal tc doesn't have to do much - so all connected peers get unlimited bandwith.

1977er commented 6 years ago

Can we just move our netcup boxes to contabo? They are known to not having a problem with bandwith intense users. ;)

1977er commented 6 years ago

Successfully decommissioned all netcup servers.