Hello,
We are experiencing increased memory usage in our application built on Release Real-Time-SDK-2.2.3.L1 · Refinitiv/Real-Time-SDK. The memory usage grows during periods of message rate bursts and does not decrease thereafter. Over period of days this leads to memory usage reaching critical levels, requiring the application restart.
For additional context, we maintain a large watchlist of items (3 mil +) which is registered 24x7.
Through analysis thus far, the potential issue appears to be with EmaPools management, specifically in getItem() and returnItem() methods.
For example, looking at DecoderPool, a new item is created when all existing items are in use (Real-Time-SDK/Cpp-C/Ema/Src/Access/Impl/EmaPool.h at e9c377a28efb7aaa015da40382e00b200283c86f · Refinitiv/Real-Time-SDK). Once returned, pool grows if additional space is required (Real-Time-SDK/Cpp-C/Ema/Src/Access/Impl/EmaPool.h at e9c377a28efb7aaa015da40382e00b200283c86f · Refinitiv/Real-Time-SDK).
It does not appear that this growth is bounded, or pool size reduced if no longer required to be at current capacity.
We've tested our application against a build with modified EmaPool.h where EncoderPool, DecoderPool and Pool objects do not rely on _vector to keep items on the heap. Instead, a call to getItem() allocates an item, while call to returnItem() deletes it. This may have implications on CPU usage, or perhaps other unintended consequences, and was done strictly to try to isolate the memory growth issue.
With this modification in place, memory usage increases during message rate bursts, but it then decreases to previous level once the message rate returns to normal.
The ask for you is to confirm that EmaPools are indeed at play here, and if so to provide an official fix.
Thanks,
Leo