From user-return-25310-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Tue Apr 3 22:05:19 2012 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 BE12592E4 for ; Tue, 3 Apr 2012 22:05:19 +0000 (UTC) Received: (qmail 14467 invoked by uid 500); 3 Apr 2012 22:05:17 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 14427 invoked by uid 500); 3 Apr 2012 22:05:17 -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 14418 invoked by uid 99); 3 Apr 2012 22:05:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 22:05:17 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a59.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 22:05:11 +0000 Received: from homiemail-a59.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a59.g.dreamhost.com (Postfix) with ESMTP id D8A18564061 for ; Tue, 3 Apr 2012 15:04:49 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; q=dns; s=thelastpickle.com; b=GsY8tL1HN1 o9SOgBahvR86rlTu58Fz8PUApX/culRESuY3eYNfTxeXNwdBbmAXWVTiU4lzjrOG bK53hMZVpoWz8tYS7SmkKyxHomaiyZ8sQL+7c0CIYP4eUillzuX9RA4Hahl685WU l4NttsV9V4TfFAmpT2/T2GB/QU32UV/jE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; s=thelastpickle.com; bh=TmhsKJFGRheYpVJC s9eePdPEjXQ=; b=HrBoZbXtJFMfgWj4KpH7/GmZcbPFrGQiRTv17Zb6B9N/WSRi ZoBFfqUFl9P2rpSc63mGUDaB/jEH44vNYmuE32NtQUxbiIT+wTUCjameCfDEB29z gM23DNHlctTn/G71nGL84wUWIiw1+x+RBNCxJQkDDoRVUd9gEOqZHU7mhvE= Received: from [192.168.125.80] (unknown [125.236.54.190]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a59.g.dreamhost.com (Postfix) with ESMTPSA id F351A564057 for ; Tue, 3 Apr 2012 15:04:48 -0700 (PDT) From: aaron morton Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: multipart/alternative; boundary="Apple-Mail=_829AD2F3-330C-4A3A-BC32-E146EBC300C3" Subject: Re: key cache size calculation Date: Wed, 4 Apr 2012 10:04:44 +1200 In-Reply-To: To: user@cassandra.apache.org References: Message-Id: <09E1B5E2-C855-4E4C-8669-7A5FD6CD27C6@thelastpickle.com> X-Mailer: Apple Mail (2.1257) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_829AD2F3-330C-4A3A-BC32-E146EBC300C3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 It depends on the workload.=20 Increase the cache size until you see the hit rate decrease, or see it = create memory pressure. Watch the logs for messages that the caches have = been decreased.=20 Take a look at the Recent Read Latency for the CF. This is how long it = takes to actually read data on that node. You can then work out the = throughput taking into account the concurrent_readers setting in the = yaml.=20 Cheers ----------------- Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 3/04/2012, at 4:14 PM, Shoaib Mir wrote: > On Tue, Apr 3, 2012 at 11:49 AM, aaron morton = wrote: > Take a look at the key cache hit rate in nodetool cfstats.=20 >=20 > One approach is to increase the cache size until you do not see a = matching increase in the hit rate. >=20 >=20 > Thanks Aaron, what do you think will be the ideal cache hit ratio = where we want this particular DB server to do around 5-6K responses per = second? right now it is doing just 2-3K per second and the cache hit = ratio I can see with cfstats is around the 85-90%. Do you think having a = higher cache hit ratio around the 95% mark will help with getting a high = throughput as well? >=20 > cheers, > Shoaib >=20 --Apple-Mail=_829AD2F3-330C-4A3A-BC32-E146EBC300C3 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 It = depends on the workload. 

Increase the cache = size until you see the hit rate decrease, or see it create memory = pressure. Watch the logs for messages that the caches have been = decreased. 

Take a look at the Recent Read = Latency for the CF. This is how long it takes to actually read data on = that node. You can then work out the throughput taking into account the = concurrent_readers setting in the = yaml. 

Cheers

http://www.thelastpickle.com

On 3/04/2012, at 4:14 PM, Shoaib Mir wrote:

On Tue, = Apr 3, 2012 at 11:49 AM, aaron morton <aaron@thelastpickle.com> wrote:
Take a look at the key cache hit = rate in nodetool cfstats. 

One approach is to = increase the cache size until you do not see a matching increase in the = hit rate.


Thanks Aaron, what do you think will be the = ideal cache hit ratio where we want this particular DB server to do = around 5-6K responses per second? right now it is doing just 2-3K per = second and the cache hit ratio I can see with cfstats is around the = 85-90%. Do you think having a higher cache hit ratio around the 95% mark = will help with getting a high throughput as well?

cheers,
Shoaib


= --Apple-Mail=_829AD2F3-330C-4A3A-BC32-E146EBC300C3--