Download User`s Manual - Community RTI Connext Users
Transcript
SharedReaderQueue Resource Management ❏ max_in_memory_bytes: LENGTH_UNLIMITED or positive number Defaults: ❏ max_in_memory_bytes: LENGTH_UNLIMITED 2.15.2 Memory Management for a Sample For every sample in a SharedReaderQueue, Queuing Service will use a buffer to store the content of the sample in serialized form. The memory for that buffer may come from a pre-allocated pool of buffers or may be dynamically allocated from the heap upon sample reception. This behavior is controlled per <domain_participant> using the XML tag <memory_management> (see Table 3.10, DomainParticipant Tags), which affects all the SharedReaderQueues within the <domain_participant>. For example: <memory_management> <sample_buffer_min_size>16000</sample_buffer_min_size> <sample_buffer_trim_to_size>true</sample_buffer_trim_to_size> </memory_management> In the above example: ❏ sample_buffer_min_size: If the serialized size of an incoming sample is smaller or equal to 16000 bytes, Queuing Service will use a pre-allocated buffer from a pool to hold the sample. The initial and maximum number of buffers in the pool as well as the pool’s growth policy is configured using the XML tag <resource_limits> under <shared_reader_queue>/<queue_qos>. When the serialized size of the incoming sample is greater than 16,000 bytes, Queuing Service will allocate the buffer from the heap dynamically upon sample reception. ❏ sample_buffer_trim_to_size: For dynamically allocated buffers Queuing Service will release the memory after the sample is removed from the SharedReaderQueue. For more information on <memory_management> and its default values, see Table 3.10, DomainParticipant Tags. 2.15.3 High and Low Watermarks The tag <queue_watermark_settings> under <shared_reader_queue>/<queue_qos>/ <resource_limits> can be used to configure high and low watermarks in a SharedReaderQueue (see Table 3.15, Queue QoS Tags). Watermarks are expressed as a percentage with respect to the maximum number of samples or maximum number of bytes allowed in the SharedReaderQueue. For example: <resource_limits> <queue_allocation_settings> <max_count>1000</max_count> <max_in_memory_bytes>10000000</max_in_memory_bytes> </queue_allocation_settings> <queue_watermark_settings> <high_watermark>90</low_watermark> <low_watermark>10</low_watermark> </queue_watermark_settings> </resource_limits> In the above example, the high watermark of 90% corresponds to 900 samples (9,000,000 bytes) and the low watermark of 10% corresponds to 100 samples (1,000,000 bytes). 2-22