Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B821ED30C for ; Sat, 17 Nov 2012 13:05:22 +0000 (UTC) Received: (qmail 3451 invoked by uid 500); 17 Nov 2012 13:05:22 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 3355 invoked by uid 500); 17 Nov 2012 13:05:22 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 3339 invoked by uid 99); 17 Nov 2012 13:05:22 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Nov 2012 13:05:22 +0000 Date: Sat, 17 Nov 2012 13:05:22 +0000 (UTC) From: "Jonathan Ellis (JIRA)" To: commits@cassandra.apache.org Message-ID: <1464890420.127478.1353157522149.JavaMail.jiratomcat@arcas> In-Reply-To: <689754973.20432.1330899899053.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CASSANDRA-3997) Make SerializingCache Memory Pluggable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-3997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499414#comment-13499414 ] Jonathan Ellis commented on CASSANDRA-3997: ------------------------------------------- So to summarize: - We don't need JNI - LD_PRELOAD makes things segfault but LD_LIBRARY_PATH works fine Right? It looks to me like we can make Allocator just return a long. Then the Memory heirarchy doesn't need to change at all. Messier but easy: just add a static Allocator to Memory. More refactoring but cleaner? move allocation outside of Memory and replace with constructor (long reference, long bytes); add allocate(long bytes) and allocateRefCounted(long bytes) factory to Allocator. RefCountedMemory would need to wrap Memory instead of subclassing. I also suggest adding a commented-out example to cassandra.yaml and cassandra-env.sh to illustrate how to enable this for those brave enough to try it. (This will go into 1.3 so plenty of time to test.) > Make SerializingCache Memory Pluggable > -------------------------------------- > > Key: CASSANDRA-3997 > URL: https://issues.apache.org/jira/browse/CASSANDRA-3997 > Project: Cassandra > Issue Type: Improvement > Components: Core > Reporter: Vijay > Assignee: Vijay > Priority: Minor > Labels: cache > Fix For: 1.3 > > Attachments: 0001-CASSANDRA-3997.patch, 0001-CASSANDRA-3997-v2.patch, 0001-CASSANDRA-3997-v3.patch, jna.zip > > > Serializing cache uses native malloc and free by making FM pluggable, users will have a choice of gcc malloc, TCMalloc or JEMalloc as needed. > Initial tests shows less fragmentation in JEMalloc but the only issue with it is that (both TCMalloc and JEMalloc) are kind of single threaded (at-least they crash in my test otherwise). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira