Java TREP UPA API - Choosing an Optimal Buffer SIze

Hi, my application is using the Java UPA API and requesting data from RWF. I have a large subscription list (~400k) and request data in batches of 2048. I have noticed that with such a large list of subscription, the subscription requests drop some symbols in random every time and end up subscribing to a lesser number of symbols. (~370k)
On Tweaking and increasing the buffer sizes, such as below :
guaranteedOutputBuffers(512);
sysSendBufSize(1024*1024*32);
sysRecvBufSize(1024*1024*32);
numInputBuffers(256);
the application reached a stable state where it does not drop requests.
Is there an optimal way to choose the buffer size so that it can handle future increase in subscription lists?
Best Answer
-
SysRecvBufSize and SysSendBufSize control the underlying TCP send and receive buffers of system. They are related to TCP sliding Window which could affect maximum Bandwidth. These settings are for the underlying socket layer. The guideline is to set the receive buffer to match or exceed the send buffer of the source application.
GuaranteedOutputBuffers and NumInputBuffers are used in the UPA (ETA) layer.
GuaranteedOutputBuffers - Specifies the number of available buffers per channel. It is pre-allocated up front regardless of the client or server side. Trade-offs are memory footprint, especially on a server where there are many connections and each has all of this configured and allocated upfront.
NumInputBuffers - Specifies the number of sequential input buffers to allocate for reading data into. This controls the maximum number of bytes that can be handled with a single network read operation. This will more or less correlate to how fast we can pull in data from a full SysRecvBuf from the OS.
The GuarunteedOutputBuffer, SysRecvBufSize, and SysSendBufSize can be changed via the Channel.ioctl method.
I think there is no ideal setting for all consumers. It depends on the behavior of the application.
In this case, I assume that the application may send a lot of subscriptions that the API or TREP is unable to handle requests on time. Therefore, the approach is implementing subscription throttle in the application. For example, the application will not send the next batch request until all responses of the previous batch request are received, or the application can use a timer to send batch requests.
0
Answers
-
@Refinitiv - could you please help understand what these 4 settings mean?guaranteedOutputBuffers, sysSendBufSize , sysRecvBufSize and numInputBuffers.
Which one applies to consumers and servers? So our application connects with TREP using UPA 8.0.0.L1.all.rrg version and as our subscription increases, we notice that the refresh messages get dropped OR we don't even subscribe.
As a consumer, what should be the ideal settings? or how can we dynamically set them?
Our applications run on Unix
0 -
Thank you for the update, when you say "The guideline is to set the receive buffer to match or exceed the send buffer of the source application." In our use case, it will be the ADS host right? so if Application A is consuming data from ADS, so you suggest to ensure the receive buffer on Application A to match or exceed that of ADS?
0 -
Our ADS buffer sizes are around 64k
*ads*tcpRecvBufSize : 64240
*ads*tcpSendBufSize : 64240
I assume these numbers are in bytes
0 -
Yes, it is the ADS host.
tcpRecvBufSize and tcpSendBufSize are in bytes.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 616 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛