[ https://issues.apache.org/jira/browse/KAFKA-14912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17743712#comment-17743712 ]
Manyanda Chitimbo commented on KAFKA-14912: ------------------------------------------- Thank you for chiming in [~divijvaidya] . > From a user perspective, setting this based on size in Bytes makes more sense >since they can configure it based on allocation of heap size instead of >relying on max size of a index file. +1 I agree. > Does the cache we use (caffeine) support a max size by bytes (instead of max > size by entry) Yes, Caffeine supports weight based eviction and we could use the size.bytes configuration and set it as `maximumWeight`. IIRC, we'll need to configure how each entry weight is calculated using the `weigher`: [https://www.javadoc.io/static/com.github.ben-manes.caffeine/caffeine/2.2.0/com/github/benmanes/caffeine/cache/Caffeine.html#weigher-com.github.benmanes.caffeine.cache.Weigher-] I'll explore on how we can implement the `weigher`. > Introduce a configuration for remote index cache size, preferably a dynamic > config. > ----------------------------------------------------------------------------------- > > Key: KAFKA-14912 > URL: https://issues.apache.org/jira/browse/KAFKA-14912 > Project: Kafka > Issue Type: Sub-task > Components: core > Reporter: Satish Duggana > Assignee: Manyanda Chitimbo > Priority: Major > > Context: We need to make the 1024 value here [1] as dynamically configurable > [1] > https://github.com/apache/kafka/blob/8d24716f27b307da79a819487aefb8dec79b4ca8/storage/src/main/java/org/apache/kafka/storage/internals/log/RemoteIndexCache.java#L119 -- This message was sent by Atlassian Jira (v8.20.10#820010)