[
https://issues.apache.org/jira/browse/CASSANDRA-8897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14486978#comment-14486978
]
Benedict commented on CASSANDRA-8897:
-------------------------------------
bq. One final thing I don't understand, even if the slabs are page aligned,
this does not guarantee some of the slices won't be across page boundaries, is
this what you meant by valid ranges to slice from?
It does if we guarantee we always read in multiples of a page, which I expect
us to enforce (and right now we _always_ read 64Kb)
a ThreadLocal pool will work brilliantly up until we have many many
concurrent_readers. but perhaps we should just stick with that. In a thread
local pool, I would expect us to be able to deallocate _everything_ at once,
which has some significant advantages. This would be considerably simpler.
Perhaps we have a shared pool of slabs, and we adopt one each time we run out
of the current slab we're allocating from thread-locally, and at the end of our
complete read operation we return every slab we've allocated back to the shared
pool. We could have logarithmically increasing slab sizes (starting at, say,
64Kb, ending at 1Mb), so that we don't waste too much memory and scale
gracefully up to many concurrent_readers.
FTR, we _could_ quite easily have a bump-the-pointer shared allocator, but I
like the relative simplicity of this approach. It's just a shared set of CLQ
(for each size of slab), much like we have for NativeAllocator, but the
management of reclamation is much simpler.
> 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)