44.4 DOMAIN_PARTICIPANT_RESOURCE_LIMITS QosPolicy (DDS Extension)

The DOMAIN_PARTICIPANT_RESOURCE_LIMITS QosPolicy includes various settings that configure how DomainParticipants allocate and use physical memory for internal resources, including the maximum sizes of various properties.

This QosPolicy sets maximum size limits on variable-length parameters used by the participant and its contained Entities. It also controls the initial and maximum sizes of data structures used by the participant to store information about locally-created and remotely-discovered entities (such as DataWriters/DataReaders), as well as parameters used by the internal database to size the hash tables used by the data structures.

By default, a DomainParticipant is allowed to dynamically allocate memory as needed as users create local Entities such as DataWriters and DataReaders or as the participant discovers new applications to store their information. By setting fixed values for the maximum parameters in this QosPolicy, you can bound the memory that can be allocated by a DomainParticipant. In addition, by setting the initial values to the maximum values, you can reduce the amount of memory allocated by DomainParticipants after the initialization period. Notice that memory can still be allocated dynamically after the initialization period. For example, when a new local DataWriter or DataReader is created, the initial memory required for its queue is allocated dynamically.

The maximum sizes of several variable-length parameters—such as the number of partitions that can be stored in the 46.5 PARTITION QosPolicy, the maximum length of data store in the 47.30 USER_DATA QosPolicy and 46.4 GROUP_DATA QosPolicy, and many others—can be changed from their defaults using this QoS. However, it is important that all DomainParticipants that need to communicate with each other use the same set of maximum values. Otherwise, when these parameters are propagated from one DomainParticipant to another, a DomainParticipant with a smaller maximum length may reject the parameter resulting in an error.

This QosPolicy includes the members in Table 44.5 DDS_DomainParticipantResourceLimitsQosPolicy . For defaults and valid ranges, please refer to the API Reference HTML documentation.

Table 44.5 DDS_DomainParticipantResourceLimitsQosPolicy

Type

Field Name

Description

DDS_Allocation-
Settings_t

(see description column)

local_writer_allocation

Each allocation structure configures how many objects of each type, <object>_allocation, will be allocated by the DomainParticipant.

See 44.4.1 Configuring Resource Limits for Asynchronous DataWriters.

DDS_AllocationSettings_t 
{ 
  DDS_Long initial_count;
  DDS_Long max_count;
  DDS_Long incremental_count;
};

See above row

local_reader_allocation

See above row

See above row

local_publisher_allocation

See above row

See above row

local_subscriber_allocation

See above row

See above row

local_topic_allocation

See above row

See above row

remote_writer_allocation

See above row

See above row

remote_reader_allocation

See above row

See above row

remote_participant_allocation

See above row

See above row

matching_writer_reader_pair_allocation

See above row

See above row

matching_reader_writer_pair_allocation

See above row

See above row

ignored_entity_allocation

See above row

See above row

content_filtered_topic_allocation

See above row

See above row

content_filter_allocation

See above row

See above row

read_condition_allocation

See above row

See above row

query_condition_allocation

See above row

See above row

outstanding_asynchronous_sample_
allocation

See above row

See above row

flow_controller_allocation

See above row

DDS_
DomainParticipant
ResourceLimits
IgnoredEntity
ReplacementKind

ignored_entity_replacement_
kind

Sets the kinds of entities allowed to be replaced when a DomainParticipant reaches ignored_entity_allocation.max_count. See 27.4 Resource Limits Considerations for Ignored Entities.

DDS_Long

local_writer_hash_buckets

Used to configure the hash tables used for database searches. If these numbers are too large then memory is wasted. If these number are too small, searching for an object will be less efficient.

DDS_Long

local_reader_hash_buckets

See above row

DDS_Long

local_publisher_hash_buckets

See above row

DDS_Long

local_subscriber_hash_buckets

See above row

DDS_Long

local_topic_hash_buckets

See above row

DDS_Long

remote_writer_hash_buckets

See above row

DDS_Long

remote_reader_hash_buckets

See above row

DDS_Long

remote_participant_hash_buckets

See above row

DDS_Long

matching_writer_reader_pair_
hash_buckets

See above row

DDS_Long

matching_reader_writer_pair_
hash_buckets

See above row

DDS_Long

ignored_entity_hash_buckets

See above row

DDS_Long

content_filtered_topic_hash_buckets

See above row

DDS_Long

content_filter_hash_buckets

See above row

DDS_Long

flow_controller_hash_buckets

See above row

DDS_Long

max_gather_destinations

Configures the maximum number of destinations that a message can be addressed in a single network send operation. Can improve efficiency if the underlying transport support can send to multiple destinations.

DDS_Long

participant_user_data_max_length

Controls the maximum lengths of 47.30 USER_DATA QosPolicy, 45.1 TOPIC_DATA QosPolicy and 46.4 GROUP_DATA QosPolicy for different entities.

Must be configured to be the same values on all DomainParticipants in the same DDS domain.

DDS_Long

topic_data_max_length

See above row

DDS_Long

publisher_group_data_max_length

See above row

DDS_Long

subscriber_group_data_max_length

See above row

DDS_Long

writer_user_data_max_length

See above row

DDS_Long

reader_user_data_max_length

See above row

DDS_Long

max_partitions

Controls the maximum number of partitions that can be assigned to a Publisher or Subscriber with the 46.5 PARTITION QosPolicy.

Must be configured to be the same value on all DomainParticipants in the same DDS domain.

DDS_Long

max_partition_cumulative_characters

Controls the maximum number of combined characters among all partition names in the 46.5 PARTITION QosPolicy.

Must be configured to be the same value on all DomainParticipants in the same DDS domain.

DDS_Long

type_code_max_serialized_length

Maximum size of serialized string for type code.

If your data type has an especially complex type code, you may need to increase this value. See 17.7 Using Generated Types without Connext (Standalone) .

Note: TypeObject is now the standard method of exchanging type information in Connext, so type_code_max_serialized_length defaults to 0 bytes. It is recommended to use type_object_max_serialized_length to configure the maximum serialized size for the TypeObject describing the type.

DDS_Long

type_object_max_serialized_length

Maximum length, in bytes, that the buffer to serialize TypeObject can consume.

This parameter limits the size of the TypeObject that a DomainParticipant is able to propagate. Since TypeObjects contain all of the information of a data structure, including the strings that define the names of the members of a structure, complex data-structures can result in TypeObjects larger than the default maximum. This field allows you to specify a larger value.

Cannot be unlimited.

DDS_Long

type_object_max_deserialized_length

Maximum number of bytes that a deserialized TypeObject can consume.

This parameter limits the size of the TypeObject that a DomainParticipant is able to store.

DDS_Long

serialized_type_object_dynamic_allocation_threshold

Threshold, in bytes, for dynamic memory allocation for the serialized typeObject. Above this threshold, the memory for a TypeObject is allocated dynamically. Below it, the memory is obtained from a pool of fixed-size buffers.

If type_object_max_serialized_length is not LENGTH_UNLIMITED and is smaller than serialized_type_object_dynamic_allocation_threshold, then serialized_type_object_dynamic_allocation_threshold will be adjusted to type_object_max_serialized_length and a warning will be logged.

By default, serialized_type_object_dynamic_allocation_threshold is the same value as type_object_max_serialized_length, 8192. This means that the typeObject memory is obtained from a pool of fixed-size buffers.

DDS_Long

deserialized_type_object_dynamic_
allocation_threshold

Threshold, in bytes, for dynamic memory allocation for the deserialized TypeObject. Above this threshold, the memory for a TypeObject is allocated dynamically. Below it, the memory is obtained from a pool of fixed-size buffers. The size of the buffers is equal to this threshold.

If type_object_max_deserialized_length is not LENGTH_UNLIMITED and is smaller than deserialized_type_object_dynamic_allocation_threshold, then deserialized_type_object_dynamic_allocation_threshold will be adjusted to type_object_max_deserialized_length and a warning will be logged.

DDS_Long

contentfilter_property_max_length

Maximum length of all data related to 18.3 ContentFilteredTopics.

DDS_Long

channel_seq_max_length

Maximum number of channels that can be specified in a DataWriter’s 47.16 MULTI_CHANNEL QosPolicy (DDS Extension).

DDS_Long

channel_filter_expression_max_length

Maximum length of a channel filter_expression in a DataWriter’s 47.16 MULTI_CHANNEL QosPolicy (DDS Extension).

DDS_Long

participant_property_list_max_length

Maximum number of properties ((name, value) pairs) that can be stored in the DomainParticipant’s 47.19 PROPERTY QosPolicy (DDS Extension) .

DDS_Long

participant_property_string_max_length

Maximum cumulative length (in bytes, including the null terminating characters) of all the (name, value) pairs in a DomainParticipant’s Property QosPolicy.

DDS_Long

writer_property_list_max_length

Maximum number of properties ((name, value) pairs) that can be stored in a DataWriter’s Property QosPolicy.

DDS_Long

writer_property_string_max_length

Maximum cumulative length (in bytes, including the null terminating characters) of all the (name, value) pairs in a DataWriter’s Property QosPolicy.

DDS_Long

reader_property_list_max_length

Maximum number of properties ((name, value) pairs) that can be stored in a DataReader’s Property QosPolicy.

DDS_Long

reader_property_string_max_length

Maximum cumulative length (in bytes, including the null terminating characters) of all the (name, value) pairs in a DataReader’s Property QosPolicy.

DDS_Long

max_endpoint_groups

Maximum number of endpoint groups allowed in an 48.1 DATA_READER_PROTOCOL QosPolicy (DDS Extension) .

max_endpoint_group_cumulative_
characters

Maximum number of combined role_name characters allowed in all endpoint groups in an 47.1 AVAILABILITY QosPolicy (DDS Extension). The maximum number of combined characters should account for a terminating NULL ('') character for each role_name string.

DDS_Long

transport_info_list_max_length

When sending DomainParticipant discovery information, this value defines the maximum number of transports whose properties will be announced to other DomainParticipants.

If a DomainParticipant has three transports installed and this value is two, the DomainParticipant will only announce information about the first two transports. When receiving DomainParticipant information, this value defines the maximum size of the list containing information about the transports installed in a remote DomainParticipant. The information about the transports installed in a DomainParticipant is made available to remote DomainParticipants through the sequence field transport_info in the Participant Built-in Topic’s Data (see Table 28.1 Participant Built-in Topic’s Data Type (DDS_ParticipantBuiltinTopicData)

Setting this value to 0 disables the capability of Connext to detect and report transport misconfigurations. However, it does not affect the capability of reaching a given DomainParticipant in all transports available on that DomainParticipant.

DDS_AllocationSettings_t

remote_topic_query_allocation

Allocation settings applied to remote TopicQueries.

These settings are applied to the allocation of information about TopicQueries created by other participants and discovered by this participant. When the participant receives a new topic query that would make the current count go above max_count, it is not processed until the current count drops (i.e. another topic query is canceled). The topic query stays in the Built-in ServiceRequest DataReader queue until it can be processed or it is canceled.

DDS_Long

remote_topic_query_hash_buckets

Number of hash buckets for remote TopicQueries.

DDS_Long

writer_data_tag_list_max_length

Maximum number of data tags ((name, value) pairs) that can be stored in a DataWriter’s DataTag QosPolicy.

DDS_Long

writer_data_tag_string_max_length

Maximum cumulative length (in bytes, including the null terminating characters) of all the (name, value) pairs in a DataWriter’s DataTag QosPolicy.

DDS_Long

reader_data_tag_list_max_length

Maximum number of data tags ((name, value) pairs) that can be stored in a DataReader’s DataTag QosPolicy.

DDS_Long

reader_data_tag_string_max_length

Maximum cumulative length (in bytes, including the null terminating characters) of all the (name, value) pairs in a DataReader’s DataTag QosPolicy.

DDS_UnsignedLong

shmem_ref_transfer_mode_max_segments

Sets the maximum number of shared memory segments that can be created by all DataWriters belonging to this participant if you are using Zero Copy transfer over shared memory. See 34.1.5 Zero Copy Transfer Over Shared Memory.

Most of the parameters for this QosPolicy are described in the Description column of the table. However, you may need to refer to the sections listed in the column to fully understand the context in which the parameter is used.

An important parameter in this QosPolicy that is often changed by users is the type_object_max_serialized_length. This parameter limits the size of the TypeObject that a DomainParticipant is able to store and propagate for user data types. TypeObjects are the wire representation for a type code. Type codes can be used by external applications to understand user data types without having the data type predefined in compiled form. However, since type codes contain all of the information of a data structure, including the strings that define the names of the members of a structure, complex data structures can result in TypeObjects larger than the default maximum of 8192 bytes. Thus it is common for users to set this parameter to a larger value. However, as with all parameters in this QosPolicy defining maximum sizes for variable-length elements, all DomainParticipants should set the same value for type_object_max_serialized_length.

The <object type> hash_buckets configure the hash-table data structure that is used to efficiently search the database. The optimal number of buckets depend on the actual number of objects that will be stored in the hash table. So if you know how many DataWriters will be created in a DomainParticipant, you may change the value of local_writer_hash_buckets to balance memory usage against search efficiency. A smaller value will use up less memory, but a larger value will make database lookups for the object more efficient.

If you modify any of the <entity type>_data_max_length, max_partitions, or max_partition_cummulative_characters parameters, then you must make sure that they are modified to be the same value for all DomainParticipants in the same DDS domain for all applications. If they are different and an application sends data that is larger than another application is configured to hold, then the two Entities, whether a matching DataWriter/DataReader pair or even two DomainParticipants will fail to connect.

44.4.1 Configuring Resource Limits for Asynchronous DataWriters

When using an asynchronous Publisher, if a call to write() is blocked due to a resource limit, the block will last until the timeout period expires, which will prevent others from freeing the resource. To avoid this situation, make sure that the DomainParticipant’s resource_limits.outstanding_asynchronous_sample_allocation is always greater than the sum of all asynchronous DataWritersresource_limits.max_samples (see 47.22 RESOURCE_LIMITS QosPolicy).

44.4.2 Configuring Memory Allocation

The <object type>_allocation configures the number of <object type>’s that can be stored in the internal Connext database. For example, local_writer_allocation configures how many local DataWriters can be created for the DomainParticipant.

The DDS_AllocationSettings_t structure sets the initial and maximum number of each object type that can be stored. The initial_count will determine how many objects are initially allocated, and max_count will determine the maximum amount of objects that Connext is allowed to allocate. The incremental_count is used to allocate more objects in chunks when the number of objects created exceed the initial_count. You can used fixed-size increments or -1 to double the amount of extra memory allocated each time memory is needed.

Notice that the memory pre-allocated for an object using the DDS_AllocationSettings_t structure is not the full memory that will be required by the object during its lifecycle. Memory can still be allocated dynamically when the object is actually used. For example, when a new local DataWriter or DataReader is created, the memory required for its queue is allocated from the heap dynamically at the moment of creation, independently of the DDS_AllocationSettings_t value. The memory pre-allocated for the object by using the DDS_AllocationSettings_t structure only accounts for the memory required to store the object in the internal in-memory database, not its full state.

You should only modify these parameters if you want to decrease the initial memory used by Connext when a DomainParticipant is created or you want to increase the maximum number of local and remote Entities that can be stored in a DomainParticipant.

44.4.3 Example

For most applications, the default values for this QosPolicy may be sufficient. However, if an application uses the PARTITION, USER_DATA, TOPIC_DATA, or GROUP_DATA QosPolicies, the default maximum sizes of the data associated with those policies may need to be adjusted as required by the application. As noted previously, you must make sure that all DomainParticipants in the same DDS domain use the same sets of values or it is possible that Connext will not successfully connect two Entities.

44.4.4 Properties

This QosPolicy cannot be modified after the DomainParticipant is created.

It can be set differently on the publishing and subscribing sides.

44.4.5 Related QosPolicies

44.4.6 Applicable DDS Entities

44.4.7 System Resource Considerations

Memory and CPU usage are directly affected by the values set for parameters of this QosPolicy. See the detailed descriptions above for specifics.