How to query the Coherence cache for metrics?
Regarding Coherence cache metrics, how can I find the key size? The key size is a wrapped java object, for example a 32 character guid. When the POF wrapper is put on it, it ends up being 35 bytes. To be perfectly accurate you would have to query in cache and grab metrics around its key size. POF isn’t fixed, a different sized java string wouldn’t be calculable by adding 2 bytes safely. So, how can the Coherence cache be queried to review metrics around the key size being used?
Tagged:
1
Best Answer
-
There is no real easy way to query the Coherence cache to get key metrics. If you want totally accurate measurements for your keys, you would need to ask the cache for a list of all the keys, and then iterate thru that list and run them thru the POF serializer and examine the byte counts yourself. that being said, my experience has been for Strings, you can get close enough by just using the number of chars in the string + 2. that will get you close enough. if you happen to use large strings as keys, you could do +3 or +4. If you use data objects as your key, you obviously need to do something else(IE, explicitly call POF serializers). I usually don't worry about being right on due to the fact that when sizing there are multiple things to worry about. 1) need to determine size of keys 2) need to determine size of objects 3) need to determine if you need backups or not, if yes, your memory usage at least doubles. 4) need to add in straight coherence overhead/object in cache, this is about 220 bytes. 5) need to determine if you need indexes or not. if so, there is no way to get this number exactly, it is just a ball park number. In the next version of Coherence, they may resolve this, but they are not sure at this time. 6) usually we add 10-30% fudge factor also, in case of miscalculations or unforseen usage. thanks kevin2
Answers
-
One additional thing, you may be able to get your key size answer via EntryProcessor's or cache.aggragate(). You could hit all objects in the cache and have coherence tally the results for you, but some legwork would need to be done to see if this it totally possible. kevin0
-
Ok. I think you're saying that I need to manually code up a way to query Coherence... there is no tool that would do it for me. Thanks!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 中文论坛