Answer the question
In order to leave comments, you need to log in
Is it possible to limit the peak UDP transfer rate (per-socket) in linux with system settings?
Is it possible in linux (kernel 4.19.56) to limit the speed of sending udp packets on a per-socket basis with kernel / iptables settings? Those. so that any single udp socket cannot send packets more than once every n microseconds, but the total throughput (for all sockets) is not limited ? Packets that do not fit into the limit should not be discarded, but buffered.
Limiting the bandwidth not in packets, but in kilobytes will also suit, but the period for calculating the average should be short (milliseconds).
Not a very short background, optional reading:
Answer the question
In order to leave comments, you need to log in
Trial, error and mana smoking led to a solution.
The necessary feature is called packet pacing , implemented in fair queue traffic policer 'e
What is characteristic - a tangible part of the materials googled on the topic concerned iptv broadcasting
to:
# tc qdisc show dev eth0
qdisc pfifo_fast 0: root refcnt 2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
#tcpdump --time-stamp-precision=micro -ttt --dont-verify-checksums udp and host 235.1.6.4
But on a laptop with a USB network picture was torn and packet loss was detected.
I would try to solve the problem by setting up traffic shaping inside the same debian towards each individual client (for example, if the stream is 10Mbps, limit it to 15Mbps) using, for example, https://lartc.org/howto/lartc.qdisc.html (beginning of documentation) If but right inside there is no such possibility, then put something between the network with consumers with a piece of iron that will shape the traffic.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question