cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefania (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-8897) Remove FileCacheService, instead pooling the buffers
Date Tue, 26 May 2015 10:32:17 GMT

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

Stefania commented on CASSANDRA-8897:
-------------------------------------

[~benedict] I resumed work on this today. A few questions:

- Your latest suggestions have reverted this:

bq. We could consider making the chunks available for reallocation before they are fully free,
since there's no different between a partially or fully free chunk now for allocation purposes

Also the chunks are not recycled right now because the owner is not null but I can add this.

- The cas on the buffer attachment is to protect against two threads simultaneously freeing
the same buffer. Without it we have two unit tests that trigger the assertion in free(): testMultipleThreadsReleaseDifferentBuffer()
and testMultipleThreadsReleaseSameBuffer(). Shall I remove the unit tests and accept we have
a race or restore the cas?

- The burn test reports this sort of errors with {{if (index == 64)}} in get():

{code}
ERROR 09:29:40 Got exception null, latest size 21241, current chunk [slab java.nio.DirectByteBuffer[pos=0
lim=27068 cap=65536], slots bitmap 11101111111111111000000000000000000000000000, capacity
65536, free 16384]
java.lang.IllegalArgumentException
	at java.nio.Buffer.limit(Buffer.java:275)
	at org.apache.cassandra.utils.memory.BufferPool$Chunk.get(BufferPool.java:604)
	at org.apache.cassandra.utils.memory.BufferPool$Chunk.get(BufferPool.java:597)
	at org.apache.cassandra.utils.memory.BufferPool$LocalPool.get(BufferPool.java:309)
	at org.apache.cassandra.utils.memory.BufferPool.takeFromPool(BufferPool.java:102)
	at org.apache.cassandra.utils.memory.BufferPool.get(BufferPool.java:76)
	at org.apache.cassandra.utils.memory.LongBufferPoolTest$1.call(LongBufferPoolTest.java:111)
	at org.apache.cassandra.utils.memory.LongBufferPoolTest$1.call(LongBufferPoolTest.java:73)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
{code}


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

Mime
View raw message