merlimat commented on issue #9958: URL: https://github.com/apache/pulsar/issues/9958#issuecomment-809523336
The main reason is to make sure the data stays cached for least possible amount of time. The data itself is not the main problem (it's already stored in pooled direct memory and there's a max size to the cache). The problem typically comes from the tracking objects that are stored in the cache (eg: the pointers to the data). The current implementation is based on the `ConcurrentSkipListMap` which stores the objects and Nodes to hold them. All these objects, if they're cached for significant amount of time will be candidate to get pushed down to the old-gen when the young-gen is compacted, and will have to get compacted there later, causing longer gc pauses. This was true for G1GC, although it might not be exactly the same with ZGC (hence: the threshold and tradeoff considerations will vary). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
