Limit backup speed including remotes

David Thistlethwaite

Active Member
May 14, 2019
63
3
28
61
I need to limit the speed to of the backups so I will not saturate my networks both local and remote, anyone have any suggestions ?

Thanks
 
Hi David,
LAN:
i did this on my LAN with a second NIC inside PBS. that NIC is limited to 50mb/s (~500mbits)

WAN:
i did this on my VPN router by policing the traffic that destinated to the remote PBS. - i just put that traffic into a lower priority class.
if you have some Linux system as firewall you can use "tc" together with "iptables" to mark them (iltables) and then police them (tc).


rgds
Stephan


incomplete example for iptables and TC to priotise traffic (i had NOT DONE this on a PBS or PVE but on a ordinary ubuntu linux system!):
----start------
echo -e "setting parameters"
## es interessiert nur der Upstream der DSL Leitung hier
DEV1=eth0
DEV1_BW_UPSTREAM=1000000000
IPT=/sbin/iptables
TC=/sbin/tc
BREAKLINE1="---------------------------------------------------------"
BREAKLINE2="========================================================="
echo -e "$BREAKLINE2"
..
.
..
echo -e "Bandbreiten und Prioritätenregeln festlegen"
echo -e "$BREAKLINE1"
echo -e "kanal 10 - fuer kleine packete bis 64byte mit hoher prio "
$TC class add dev $DEV1 parent 1:1 classid 1:10 htb rate 400kbit ceil 1000kbit prio 0
echo -e "$BREAKLINE1"
echo -e "kanal 11 - fuer VPN und SSH"
$TC class add dev $DEV1 parent 1:1 classid 1:11 htb rate 6000kbit ceil 1gbit prio 1
echo -e "$BREAKLINE1"
..
.
..
echo -e "zuweisen der Datenpaketen in die Kanäle..."
echo -e "$BREAKLINE1"
echo -e "markieren aller pakete die max 64byte lang sind"
$IPT -A POSTROUTING -t mangle -o $DEV1 -p tcp -m length --length :64 -j MARK --set-mark 10
..
echo -e "markieren der RSYNC pakete"
$IPT -A POSTROUTING -t mangle -o $DEV1 -p tcp --dport 873:873 -j MARK --set-mark 13
..
.
..
echo -e "kernel mitteilen wie er mit den kanaelen umgehen soll"
echo -e "$BREAKLINE1"
$TC filter add dev $DEV1 parent 1:0 prio 0 protocol ip handle 10 fw flowid 1:10
$TC filter add dev $DEV1 parent 1:0 prio 0 protocol ip handle 11 fw flowid 1:11
$TC filter add dev $DEV1 parent 1:0 prio 0 protocol ip handle 12 fw flowid 1:12
$TC filter add dev $DEV1 parent 1:0 prio 0 protocol ip handle 13 fw flowid 1:13
$TC filter add dev $DEV1 parent 1:0 prio 0 protocol ip handle 14 fw flowid 1:14
$TC qdisc add dev $DEV1 parent 1:10 handle 10: sfq perturb 10
$TC qdisc add dev $DEV1 parent 1:11 handle 11: sfq perturb 10
$TC qdisc add dev $DEV1 parent 1:12 handle 12: sfq perturb 10
$TC qdisc add dev $DEV1 parent 1:13 handle 13: sfq perturb 10
$TC qdisc add dev $DEV1 parent 1:14 handle 14: sfq perturb 10
--------end------
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!