cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vijay (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CASSANDRA-1969) Use BB for row cache - To Improve GC performance.
Date Thu, 13 Jan 2011 17:25:48 GMT

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

Vijay commented on CASSANDRA-1969:
----------------------------------

Update:

Reclaiming the space of the invalid cache objects gets complicated.... running OOM (Native)
is not within the GC control (until a full GC runs on the JVM automatically, free space are
not automatically/manually reclaimed), and I couldn't find a clean way to free the native
memory from Java. 

Option 1 (Easier option): Set a hard limit on the Native memory which can be allocated by
the GC once it is full, load the Objects in cache in the Heap Memory. Eventually the cache
will be cleaned by GC (always staying within 2 limits hard- total objects cached and soft
- total objects which can be cached in the heap).

Option 2: Allocate chunks of memory in the native memory and reclame it when they are needed.
Example: when you need 25.5 K block always allocate 26K block and once it is free allocate
a new Object which is of the same size into the cache (This is only if GC didn't reclaim the
object, if reclaimed by GC reassign memory native), this can be done using PhantomReference,
'if' enqued then allocate new 'else' use the same block of memory.

> Use BB for row cache - To Improve GC performance.
> -------------------------------------------------
>
>                 Key: CASSANDRA-1969
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1969
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>         Environment: Linux and Mac
>            Reporter: Vijay
>            Assignee: Vijay
>            Priority: Minor
>         Attachments: BB_Cache-1945.png, JMX-Cache-1945.png, Old_Cahce-1945.png, POC-0001-Config-1945.txt,
POC-0002-Update_existing-1945.txt, POC-0003-New_Cache_Providers-1945.txt
>
>
> Java BB.allocateDirect() will allocate native memory out of the JVM and will help reducing
the GC pressure in the JVM with a large Cache.
> From some of the basic tests it shows around 50% improvement than doing a normal Object
cache.
> In addition this patch provide the users an option to choose BB.allocateDirect or store
everything in the heap.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message