[ 
https://issues.apache.org/jira/browse/CASSANDRA-8897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14487046#comment-14487046
 ] 

Benedict commented on CASSANDRA-8897:
-------------------------------------

bq.  Here though we do need to be careful about thread contention but it should 
be easy to solve with a sentinel in the queue or similar.

I would suggest a shared CLQ for the slices, and if that gets exhausted we just 
allocate a new slab on any thread that encounters the problem (if there's room) 
and this thread slices the buffer and places them all on the CLQ. Once they're 
there, we don't care about the underlying backing buffer, only its slices, and 
we can just rely on the CLQ to do everything for us. We don't mind too much if 
there's a race on allocation of a new slab (i.e. multiple threads allocate a 
slab at once) ending up with more than we _needed_ since we will always enforce 
our maximum memory constraints, so it's just a little extra breathing room.

> 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)

Reply via email to