Jump to content

GstNetBalancer/User Guide: Difference between revisions

m
Add properties usage
mNo edit summary
m (Add properties usage)
Line 21: Line 21:




== Properties selection ==
== Main Properties ==
This element balances the network load by distributing the packages over time. To do so netbalancer provides 3 main properties:
This element balances the network load by distributing the packages over time. To do so netbalancer provides 3 main properties:


Line 30: Line 30:
You can adjust this properties to fit you network and stream conditions.
You can adjust this properties to fit you network and stream conditions.


In general the netbalancer will distribute the bandwidth between the intervals, allowing only to send a portion of the bandwidth in each interval. If the stream provides more bytes that the bytes assigned to an interval time, the netbalancer will wait until the next interval to send them.
Also you can define a minimum delay between packets to have minimal uniform distribution.
The complete list of properties for the netbalancer can be seen using the following command:
<pre>
gst-inspect-1.0 netbalancer
</pre>
=== How to choose properties values ===
It is important to set the properties above carefully in order to achieve the expected results.
==== The bandwidth property ====
This property is set based on the network capabilities; however, in most cases this parameter by itself is not enough to balance the transmission.
As shown in figure 1 both cases A and B have the same bandwidth and transmit the same amount of bytes per second; however, the network load is distributed in two very different patterns. This is where the distribution factor comes into play.
==== The distribution_factor property ====
This property splits the bandwidth specified for a second into smaller intervals. This allows to limit the transmission with more control while keeping the same bandwidth.
Figure 1 A has a distribution factor of <code>30</code>, which means that the <code>1.34Mbps</code> is not limited as <code>1.34Mb = 167500B</code> every <code>1s</code>, but instead it is limited as <code>5600B</code> every <code>33ms</code>.


Figure 1 B takes this even further, instead of being limited to <code>5600B</code> every <code>33ms</code> this one uses a distribution factor of <code>120</code> so it divides the previous intervals into fourths; meaning that the bandwidth is seen as <code>1400B</code> every <code>8.25ms</code>.


In general the netbalancer will distribute the bandwidth between the intervals, allowing only to send a portion of the bandwidth in each interval. If the stream provides more bytes that the bytes assigned to an interval time, the netbalancer will wait until the next interval to send them.  
Notice how all of this configurations still keep a <code>1.34Mbps</code> bandwidth but the overall behavior and limitations are different.


Also you can define a minimum delay between packets to have minimal uniform distribution.
==== The min_delay property ====
This property is used to add a minimum separation between packets to make sure they are distributed properly. It is useful since a time window will likely have multiple packets in it and it is not realistic to have a packet per window. Adding this delay requires you to know the maximum number of packets in each window. If a worst case scenario means that every <code>33ms</code> window will have <code>10</code> packets. Then a delay of <code>33ms/10</code> can be added so that all packets still fit into that frame but are evenly distributed. This is done for a worst case scenario because otherwise the delays would push packets out of their expected time window.


== Examples ==
== Examples ==
Please refer to the [[GstNetBalancer/Examples|Examples]] page for reference pipelines.
Please refer to the [[GstNetBalancer/Demo|Demo]] page for a more detailed real life example of how to set the element parameters.


<noinclude>
<noinclude>
{{GstNetBalancer/Foot|previous=|next=|}}
{{GstNetBalancer/Foot|previous=|next=|}}
</noinclude>
</noinclude>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.