[ https://issues.apache.org/jira/browse/CASSANDRA-8897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14484634#comment-14484634 ]
Stefania commented on CASSANDRA-8897: ------------------------------------- [~benedict], see if this is what you had in mind: https://github.com/stef1927/cassandra/commits/8897 To share the pooled buffers across all SegmentedFile instances I retained the cache strategy that was in place for the RARs, only we now have queues of buffers with same properties (size, direct allocation, page alignment). The pooled buffers are accessed directly by the RAR instances, so the pooling segmented files are gone. The buffer pool is implemented by {{BufferPool}}, a new class, and for page alignment we create a bigger buffer and slice it on an aligned buffer, is there a better way to do this? We only align to the page size for direct allocation and at the moment only the compressed RAR uses direct allocation In the end I decided to drop the initial pool size and let the pools grow dynamically up to the maximum allowed, then they get evicted if they get cold. > Remove FileCacheService, instead pooling the buffers > ---------------------------------------------------- > > Key: CASSANDRA-8897 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8897 > Project: Cassandra > Issue Type: Improvement > Components: Core > Reporter: Benedict > Assignee: Stefania > Fix For: 3.0 > > > After CASSANDRA-8893, a RAR will be a very lightweight object and will not > need caching, so we can eliminate this cache entirely. Instead we should have > a pool of buffers that are page-aligned. -- This message was sent by Atlassian JIRA (v6.3.4#6332)