-
Notifications
You must be signed in to change notification settings - Fork 54
Traffic shaping
Traffic shaping is a technique to adjust inter-packet interval. Without pacing packets, packet are usually sent at link-speed.
With higher bitrates, the traffic tend to create bursts that network isn't capable to transmit due to slower interface speed and limited network buffers on active network devices. Imagine that FullHD uncompressed frame has about 4 MB and could be send from a computer connected with 10 GE NIC. If there is further a narrower link, let say 1 Gb, adjacent swicht wouldn't have so much buffer capacity to slow down the traffic and would drop packets. To avoid that, traffic shaping can be deployed. UltraGrid by default uses traffic shaper that creates inter-packet delay to send the frame uniformly during frame time. However, other options can be used to control UltraGrid traffic shaper:
-
automatic traffic shaping (default):
uv -l auto
Spread the packet of the frame across frame time doesn't guarantee any bandwidth (eg. if sending H.264 without Intra Refresh, the I-frames can be significantly bigger than specified codec bitrate and during that frame, the actual bitrate can be significantly higher).
-
disabled traffic shaper:
uv -l unlimited
Turns off traffic shaper. This can be useful because it saves performance used for traffic shaping (it uses busy waiting to produce inter-packet intervals). Traffic shaper can be safely turned of either if the traffic is low (let say few Mbps) or you have homogenous network - eg. 1 GE end-to-end connectivity.
-
traffic shaping at specified bitrate
uv -l 20M
Generate traffic at the rate at most 20 Mbps. Make sure that you setup video compression accordingly to be strictly lower than the specified bitrate (ideally 50% or so). Traffic shaping is done per frame time interval, so if a frame size is higher than dedicated bandwidth for the time slot, it will be sent longer time. Suffixes K,M,G can be used as a part of the parameter.
If you have any technical or non-technical question or suggestion please feel free to contact us at