Open pulpbot opened 2 years ago
From: @dralley (dalley) Date: 2020-12-16T15:01:59Z
It is likely possible to use cgroups to accomplish this
We do not have a max speed in bits / sec, but we do have rate limiting in requests / sec. See the rate_limit
attribute in the remote API docs. If having a bytes / second rate limiting would be useful please comment or reopen this ticket.
Awaiting more info for RFE https://bugzilla.redhat.com/show_bug.cgi?id=2035224
We can wait to hear more. In the places I've heard about this comparison to Pulp2 is that the bandwidth restricted is desired to be "from Pulp" not necessarily "Pulp syncing from repo X". The latter we could provide, but the former I don't think as a clustered application we're in a position to offer clustered byte-based rate limiting.
Firewall based traffic shaping comes to my mind (problem solved elsewhere...).
Yeah I'm still not seeing how doing this at the application layer is the appropriate solution. The more they explain about their requirements the more it seems that a network-level or firewall-level solution is what they ought to be using. But I guess they don't like that solution.
They could also use tc
on a single machine with no extra hardware, or maybe cgroups.
cgroups FTW
Agreed.
Reopening this to avoid fighting with the Bugzilla automation while a discussion is ongoing
If this is to be accomplished, the issue would need to be filed against aiohttp. I don't think Pulp can support this until aiohttp supports it.
A user shared an example that limits public net to 250mbps, and leaves private at 10gbps
tc qdisc add dev eth0 root handle 1: htb default 20
modprobe ifb numifbs=1
ip link set dev ifb0 up
tc qdisc add dev eth0 handle ffff: ingress
tc filter add dev eth0 parent ffff: protocol ip prio 2 u32 match ip src 0.0.0.0/0 action mirred egress redirect dev ifb0
tc qdisc add dev ifb0 root handle 2: htb
tc class add dev eth0 parent 1: classid 1:1 htb rate 10240000kbit
tc class add dev ifb0 parent 2: classid 2:1 htb rate 256000kbit
tc filter add dev ifb0 protocol ip parent 2: prio 10 u32 match ip src 0.0.0.0/0 flowid 2:1
tc filter add dev eth0 parent ffff: protocol ip prio 1 u32 classid 1:1 match ip src 192.168.0.0/16 flowid 1:1
tc filter add dev eth0 parent ffff: protocol ip prio 1 u32 classid 1:1 match ip src 172.16.0.0/16 flowid 1:1
tc filter add dev eth0 parent ffff: protocol ip prio 1 u32 classid 1:1 match ip src 10.0.0.0/8 flowid 1:1
Author: mped (mped)
Redmine Issue: 6700, https://pulp.plan.io/issues/6700
hi
In Pulp2 it is possible to set the max-speed when synchronizing a repo would it be possible to do this for Pulp3 too please?
Thanks
Matt