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

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

bq. Is this still OK?

That looks OK to me, since it's only printed during debug mode. We could add a 
String parameter to assertNotReleased and call it explicitly ourselves if we 
want to clarify it though.

bq. I cannot see the race because only the owning thread can recycle and other 
threads do not have access until the buffer is back in the global pool queue, 
please refer to the comments in the code.

That will teach me to try and get all of my outstanding tasks done in a race 
before bed. There are still some fairly problematic characteristics. First: 
this looks to largely remove the benefit of re-allocating from partially freed 
chunks in the same thread, since the thread will immediately free any chunk 
that is not its current one. Secondly, it can result in some fairly weird 
characteristics in the global pool, since we can return an almost entirely used 
Chunk back into the pool for use by another thread. So we could have a large 
number of Chunks that are not helpful popping in and out of the global pool, 
eliminating the amortization of the overhead costs. This could also lead to the 
temporary aggregation of large quantities of mostly-free chunks at the back of 
a LocalPool queue, because they were mostly not-free when it fetched and used 
them. So it could have only tiny buffers sliced from these chunks, leaving 
perhaps 90% of the memory it occupies unused. If it is a long running operation 
(say, compaction) this would be fairly undesirable.

> 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.x
>
>         Attachments: 9240_test_results.txt, 
> snapshot-1431582436640-cpu-backtraces.png, 
> snapshot-1431582436640-cpu-calltree-compression-8897.nps, 
> snapshot-1431582436640-cpu-calltree-compression-trunk.nps
>
>
> 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