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 C6E51D6A5 for ; Tue, 11 Dec 2012 15:01:26 +0000 (UTC) Received: (qmail 41799 invoked by uid 500); 11 Dec 2012 15:01:26 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 41754 invoked by uid 500); 11 Dec 2012 15:01:26 -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 41704 invoked by uid 99); 11 Dec 2012 15:01:25 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Dec 2012 15:01:25 +0000 Date: Tue, 11 Dec 2012 15:01:25 +0000 (UTC) From: "Jonathan Ellis (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-5020) Time to switch back to byte[] internally? 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-5020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13529026#comment-13529026 ] Jonathan Ellis commented on CASSANDRA-5020: ------------------------------------------- using madvise/mincore is race prone (we purge it from cache on compaction, a read in progress pulls some back into cache, now we wait indefinitely for it to get pushed out of cache by other data). using weakreferences means we're back to pre-1.0 of waiting for JVM GC before we can delete obsolete sstables. > Time to switch back to byte[] internally? > ----------------------------------------- > > Key: CASSANDRA-5020 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5020 > Project: Cassandra > Issue Type: Improvement > Components: Core > Reporter: Jonathan Ellis > Fix For: 2.0 > > > We switched to ByteBuffer for column names and values back in 0.7, which gave us a short term performance boost on mmap'd reads, but we gave that up when we switched to refcounted sstables in 1.0. (refcounting all the way up the read path would be too painful, so we copy into an on-heap buffer when reading from an sstable, then release the reference.) > A HeapByteBuffer wastes a lot of memory compared to a byte[] (5 more ints, a long, and a boolean). > The hard problem here is how to do the arena allocation we do on writes, which has been very successful in reducing STW CMS from heap fragmentation. ByteBuffer is a good fit there. -- 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