9.3. Heap Benchmarks¶
The “Heap” section provides information about how much dynamically allocated memory is used by Connext DDS Micro. It should be noted that exact numbers are very difficult to estimate and that the numbers are only for guidance.
The numbers include resources used by the RH_SM, WH_SM, and UDP components, but not the resources used by the dynamic discovery component (DPDE) or the static discovery component (DPSE). In addition, please note that the memory does not include memory for the actual user-data. This must be added according to the resource-limits. The numbers are for the release libraries.
The size for entities that are controlled by resource-limits are provided. In addition, a formula is provided to estimate the amount of memory used by a data reader and data writer as these are typically the ones that consume most of the memory.
9.3.1. Heap Usage¶
The following table shows how much memory each resource-limit in the memory model
Resource-limit | 32 bits | 32 bits Security | 64 bits | 64 bits Security | Notes |
---|---|---|---|---|---|
DomainParticipantFactory | 3364 | 3364 | 5360 | 5360 | |
max_participants | 39989 | 44517 | 54149 | 61093 | This is the memory for an empty participant. The memory used by each entity must be added as described for each entity. |
max_components | N/A | N/A | N/A | N/A | |
local_topic_allocation | 164 | 164 | 304 | 304 | Add strlen(topic_name) + 1 |
local_type_allocation | 76 | 76 | 144 | 144 | Add strlen(type_name) + 1 |
local_publisher_allocation | 892 | 976 | 1104 | 1248 | |
local_subscriber_allocation | 884 | 968 | 1088 | 1232 | |
local_reader_allocation | 4024 | 4368 | 6004 | 6524 | The sample and instance resources must be added. |
local_writer_allocation | 3924 | 4196 | 5904 | 6336 | The sample and instance resources must be added. |
matching_writer_reader_pair_allocation | 48 | 56 | 80 | 96 | |
remote_participant_allocation | 8178 | 10134 | 9818 | 12850 | |
remote_writer_allocation | 480 | 700 | 628 | 988 | This includes the topic_name |
remote_reader_allocation | 592 | 812 | 716 | 1076 | This includes the topic_name |
max_destination_ports | 164 | 164 | 196 | 196 | |
max_receive_ports | 524 | 524 | 672 | 672 | |
(DataReader) max_instances | 288 | 308 | 424 | 448 | |
(DataReader) max_samples | 196 | 236 | 292 | 332 | |
(DataReader) max_remote_writers | 1708 | 1716 | 1904 | 1920 | |
(DataReader) max_samples_per_instance | 0 | 0 | 0 | 0 | |
(DataReader) max_routes_per_writer | 124 | 124 | 168 | 168 | |
(DataReader) max_remote_writers_per_instance | 4 | 4 | 8 | 8 | |
(DataReader) max_samples_per_remote_writer | 0 | 0 | 0 | 0 | |
(DataWriter) max_instances | 84 | 84 | 128 | 128 | |
(DataWriter) max_samples | 1096 | 1096 | 1240 | 1240 | |
(DataWriter) max_remote_readers | 396 | 404 | 536 | 552 | |
(DataWriter) max_routes_per_reader | 124 | 124 | 168 | 168 | |
(DataWriter) max_samples_per_instance | 0 | 0 | 0 | 0 | |
max_locators_per_discovered_participant | 83 | 83 | 83 | 83 | |
max_buffer_size | 0 | 0 | 0 | 0 | |
max_message_size | 0 | 0 | 0 | 0 | |
matching_reader_writer_pair_allocation | 0 | 0 | 0 | 0 |
9.3.2. Dynamic Discovery (DPDE) Heap Usage Information¶
The DPDE plugin is a DDS application that advertises locally created DDS entities and listens for DDS entities available in the DDS data-space. It is implemented using the DDS APIs supported by Connext DDS Micro.
The DPDE plugin creates the following DDS entities:
- One DDS Publisher
- One DDS Subscriber
- Three DDS Topics
- Three DDS DataReaders
- Three DDS DataWriters
The DPDE plugin also registers the following three types:
- DDS_ParticipantBuiltinTopicData
- DDS_PublicationBuiltinTopicData
- DDS_SubscriptionBuiltinTopicData
All heap memory allocated by the DPDE plugin is allocated after the DDS DomainParticipant is created (no additional memory is allocated after the DDS DomainParticipant is enabled).
DPDE Plugin | 32 bits | 32 bits Security | 64 bits | 64 bits Security |
---|---|---|---|---|
Plugin | 293355 | 1467239 | 314563 | 1492131 |
9.3.3. Static Discovery (DPSE) Heap Usage Information¶
The DPSE plugin is a DDS application that only advertises locally created DDS DomainParticipants and listens for other DDS DomainParticipants available in the DDS data-space. It is implemented using the DDS APIs supported by Connext DDS Micro.
The DPSE plugin creates the following DDS entities:
- One DDS Publisher
- One DDS Subscriber
- One DDS Topics
- One DDS DataReader
- One DDS DataWriter
The DPSE plugin also registers the following type:
- DDS_ParticipantBuiltinTopicData
All heap memory allocated by the DPSE plugin is allocated after the DDS DomainParticipant is created (no additional memory is allocated after the DDS DomainParticipant is enabled).
DPSE Plugin | 32 bits | 32 bits Security | 64 bits | 64 bits Security |
---|---|---|---|---|
Plugin | 155713 | 158521 | 163117 | 167061 |