Memory leak using Reuters RFA7.4.1.L1.win
What appears to be a memory leak using Reuters RFA7.4.1.L1.win.
The issue can be duplicated using the StarterConsumer Example program. We used
the VS100_Shared project. We are using RSSL. We set the \itemList configuration parameter
in the StarterConsumer.cfg file to a list of actively traded instruments:
\itemList = "GE,DIS,AAPL,HD,BAC,T,FCX"
We then start the Release_WIN32_VS100_Shared\StarterConsumer.exe application from the
command prompt and bring up task manager. The memory used by StarterConsumer continues
to grow and never stablizes or shrinks.
We also tried changing: void StarterConsumer::processEvent(const Event& event) so that
it does not call processOMMItemEvent(...) on the theory that this routine (or perhaps
one it calls, like the Decoder) wasleaking the memory.
#ifdef notdef
case OMMItemEventEnum:
processOMMItemEvent(static_cast<const OMMItemEvent&>(event));
break;
#endif
The process still leaked memory at the same rate. Note that the amount of memory leaked, and the speed at
which it is leaked is directly related to market activity. The more active the market (and
the instruments being watched), the faster the amount of memory used increases.
We also tried to change the message pool memory parameters from:
\Control\MessagePools\OMMItemEventPool\InitialSize = 10000
\Control\MessagePools\OMMItemEventPool\Increment = 10000
\Control\MessagePools\OMMItemEventPool\MaximumSize = 0
to:
\Control\MessagePools\OMMItemEventPool\InitialSize = 100
\Control\MessagePools\OMMItemEventPool\Increment = 100
\Control\MessagePools\OMMItemEventPool\MaximumSize = 100
This did not change the behavior..
Any help is appreciated.
Best Answer
-
I got the different result when running StarterConsumer
in RFA C++ 7.6.2.L1 package. I modified the code a bit. Instead of
decoding the data, I modified it to print the update rate that StarterConsumer could handle and retrieve per second....
int _updateCount;
unsigned long long endTime;
...
bool StarterConsumer::init()
{
...
_updateCount = 0;
endTime = AppUtil::getCurrentTime();
endTime += 1000;
...
}
void StarterConsumer::processMarketPriceResponse(const rfa::sessionLayer::OMMItemEvent& event, const RespMsg& respMsg)
{
++_updateCount;
unsigned long long currentTime = AppUtil::getCurrentTime();
if (endTime <= currentTime)
{
RFA_String text("Response Rate: ", 0, false);
text.append(_updateCount);
text.append("\n");
AppUtil::log(__LINE__, AppUtil::TRACE, text.c_str());
endTime = currentTime + 1000;
_updateCount = 0;
}
return;
…
}I used the following configurations.
\Control\MessagePools\OMMItemEventPool\InitialSize = 10000
\Control\MessagePools\OMMItemEventPool\Increment = 10000
\Control\MessagePools\OMMItemEventPool\MaximumSize = 0I connected StarterConsumer to my provider so I could
control the update rate sent to the consumer. I have tested it with several
updates per second (100, 1000, 10000, and 100000). The result is shown below.From the result, the memory usage is stable. StarterConsumer without
decoding can handle 100000 updates per second without memory growth.Normally, the memory growth in RFA happens because the
application is a slow consumer. For example, if the application is able to
handle around hundreds of updates per second but the real update rate of all
subscribed items is more than thousands, the memory will definitely grow due to
the increasing numbers of unprocessed events in the event queue.There are two ways to verify if the application is a slow
consumer.- Verify the number of updates per second that the
application can handle and compare to the real update rate for those items - Or, monitor the return value of EventQueue::dispatch()
method. A non-negative return value from dispatch() indicates an
estimate of the number of remaining events in the event queue or the event
queue group. However, applications should not rely on the exact value as it is
only an estimate
1 - Verify the number of updates per second that the
Answers
-
Would suggest using a newer version of RFA; going with the latest, RFA 8, if possible. Many important fixes have been introduced to RFA in version 7.6 (please check with version READMEs for the specifics).
RFA 8 offers major new functionality, while incorporating fixes from the previous versions.
RFA before 7.6.2 will be obsolete this year (2016), please refer to:
1 -
I encounter this problem too. I try using 7.6.2 shared or static version. I still get this problem. I download the version 8, but this is only 64 bit version which I need to change a lot for my code. Please help if any work around solution for this. I am working on this problem for nearly 2 months and finally find out this is a bug from your api. Please help.
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛