Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9028792E5 for ; Mon, 19 Dec 2011 00:37:37 +0000 (UTC) Received: (qmail 93776 invoked by uid 500); 19 Dec 2011 00:37:35 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 93749 invoked by uid 500); 19 Dec 2011 00:37:35 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 93741 invoked by uid 99); 19 Dec 2011 00:37:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Dec 2011 00:37:35 +0000 X-ASF-Spam-Status: No, hits=0.1 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dnd1066@gmail.com designates 74.125.82.172 as permitted sender) Received: from [74.125.82.172] (HELO mail-we0-f172.google.com) (74.125.82.172) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Dec 2011 00:37:27 +0000 Received: by werb14 with SMTP id b14so1160522wer.31 for ; Sun, 18 Dec 2011 16:37:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=2C5aYJaiKDtXpN0DytftOcKaQw9UK4mknvLZeUcJmdU=; b=UugEdMT9qzH6TsF2LzyYnmnp7yWuvNtg/4GrSHoxsD8zMopRhqNI5ixq8u/dbSvTku Ul9OkCn8nJKcz1ym8l9AsZQf/yhbklG1B+CRUZLgcPlYJiTDtd0PfeUhfDCeGhFQumSM Wf9MW0lwPJxB5RSymc5Na0FdgkOdM6HUpa9Bs= Received: by 10.216.132.147 with SMTP id o19mr6305674wei.7.1324255027814; Sun, 18 Dec 2011 16:37:07 -0800 (PST) Received: from [192.168.1.2] (93-96-159-41.zone4.bethere.co.uk. [93.96.159.41]) by mx.google.com with ESMTPS id en20sm23487113wid.10.2011.12.18.16.37.06 (version=SSLv3 cipher=OTHER); Sun, 18 Dec 2011 16:37:06 -0800 (PST) Message-ID: <4EEE8739.70508@gmail.com> Date: Mon, 19 Dec 2011 00:37:13 +0000 From: Guy Incognito User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: user@cassandra.apache.org Subject: Re: memory estimate for each key in the key cache References: <1324089449.72520.YahooMailNeo@web161206.mail.bf1.yahoo.com> <1324090377.11873.YahooMailNeo@web161202.mail.bf1.yahoo.com> <4EEC0D2C.2070309@mebigfatguy.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org to be blunt, this doesn't sound right to me, unless it's doing something rather more clever to manage the memory. i mocked up a simple class containing a byte[], ByteBuffer and long, and the shallow size alone is 32 bytes. deep size with a byte[16], 1-byte bytebuffer and long is 132. this is a on a 64-bit jvm on win x64, but is consistent(ish) with what i've seen in the past on linux jvms. the actual code has rather more objects than this (it's a map, it has a pair, decoratedKey) so would be quite a bit bigger per key. On 17/12/2011 03:42, Brandon Williams wrote: > On Fri, Dec 16, 2011 at 9:31 PM, Dave Brosius wrote: >> Wow, Java is a lot better than I thought if it can perform that kind of >> magic. I'm guessing the wiki information is just old and out of date. It's >> probably more like 60 + sizeof(key) > With jamm and MAT it's fairly easy to test. The number is accurate > last I checked. > > -Brandon