12.3. Congestion Control Settings ProΒΆ
When using Congestion Control Pro, the DomainParticipant may need specific parameters
to be set.
Properties related with this feature lie on the fastdds.congestion namespace.
At least one of these properties should be set in order for the congestion control to be enabled.
Property
fastdds.congestion.pluginis used to set the congestion control plugin to be used. If the property is not present, it will be set tobasic. See congestion control plugins for more information about the available plugins.Property
fastdds.congestion.periodis used to set the interval in milliseconds for checking whether the bandwidth to certain destinations should be updated. If the property is not present, it will be set to10000(10 seconds). The minimum valid value for this property is1500(1.5 seconds)Property
fastdds.congestion.initial_bandwidthis used to set the bandwidth that will be initially assigned to new destinations, in bytes per second. The user must provide a value greater than the bandwidth required to send one message per second. If the property is not present, it will be set to half the size of the socket send buffer or the size of a message, whichever is greater.Property
fastdds.congestion.increase_multiplieris used to set the multiplier that will be applied to increase the bandwidth to a destination when no congestion is detected. Thus, it should be a value greater than 1. If the property is not present, it will be set to1.2.Property
fastdds.congestion.decrease_multiplieris used to set the multiplier that will be applied to decrease the bandwidth to a destination when congestion is detected. Thus, it should be a value between 0 and 1. If the property is not present, it will be set to0.75.
The following is an example of how to set the congestion control up using the properties of DomainParticipantQoS.
DomainParticipantQos participant_qos;
participant_qos.properties().properties().emplace_back(
"fastdds.congestion.plugin",
"basic");
participant_qos.properties().properties().emplace_back(
"fastdds.congestion.period",
"10000");
participant_qos.properties().properties().emplace_back(
"fastdds.congestion.initial_bandwidth",
"100");
participant_qos.properties().properties().emplace_back(
"fastdds.congestion.increase_multiplier",
"1.2");
participant_qos.properties().properties().emplace_back(
"fastdds.congestion.decrease_multiplier",
"0.75");
<!--
<?xml version="1.0" encoding="UTF-8" ?>
<dds xmlns="http://www.eprosima.com">
<profiles>
-->
<participant profile_name="congestion_control_domainparticipant_xml_profile">
<rtps>
<propertiesPolicy>
<properties>
<property>
<name>fastdds.congestion.plugin</name>
<value>basic</value>
</property>
<property>
<name>fastdds.congestion.period</name>
<value>10000</value>
</property>
<property>
<name>fastdds.congestion.initial_bandwidth</name>
<value>1000</value>
</property>
<property>
<name>fastdds.congestion.increase_multiplier</name>
<value>1.2</value>
</property>
<property>
<name>fastdds.congestion.decrease_multiplier</name>
<value>0.75</value>
</property>
</properties>
</propertiesPolicy>
</rtps>
</participant>