Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 3454 invoked from network); 4 Jun 2010 02:16:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Jun 2010 02:16:39 -0000 Received: (qmail 27849 invoked by uid 500); 4 Jun 2010 02:16:38 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 27833 invoked by uid 500); 4 Jun 2010 02:16:38 -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 27825 invoked by uid 99); 4 Jun 2010 02:16:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jun 2010 02:16:38 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=10.0 tests=AWL,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbellis@gmail.com designates 74.125.82.172 as permitted sender) Received: from [74.125.82.172] (HELO mail-wy0-f172.google.com) (74.125.82.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jun 2010 02:16:33 +0000 Received: by wyf23 with SMTP id 23so544283wyf.31 for ; Thu, 03 Jun 2010 19:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=9++xkcIIfLar9/c5i3G2x56rG4rrt2AeQ09wwVR8sVM=; b=oq4hrrZ27/egJwjBrc+md4E9RNengWGuX8fctXcmEwJ0Ua3N0i6ql54jJfBXYcmwt1 2TUcOgy+mHQ4pMR0I49EH53XHZDTf+5pWw1MkxvgzVXVEfXxfcijMdrv4nBQY+sGOiOq +kLWbNG6lSQ16B0gw3dRA3zeZhq6wM0qr/lTU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=qchcOHFpPmMue1hXYnKDWZLgKli1vCpL54pAfcv9TEXOpd1aFJESox05aGBqifPxJh fdfxEjq0YZPfDEBnP8vE2yZuqn9Xevln1IMU4A0Y6zm8BXsrxhi69xdlt3qqKU8eP/LV zYnJaVuKa6RjhRJYTuaRqVxqesjXprTL87aj0= Received: by 10.216.161.67 with SMTP id v45mr1727480wek.26.1275617769223; Thu, 03 Jun 2010 19:16:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.17.197 with HTTP; Thu, 3 Jun 2010 19:15:49 -0700 (PDT) In-Reply-To: References: <6A9F8ED2-933E-491D-BEC0-A0F8D7210594@ketralnis.com> From: Jonathan Ellis Date: Thu, 3 Jun 2010 19:15:49 -0700 Message-ID: Subject: Re: Effective cache size To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Jun 3, 2010 at 10:17 AM, David King wrote: >>> So with the row cache, that first node (the primary replica) is the one= that has that row cached, yes? >> No, it's the closest node as determined by snitch.sortByProximity. > > And with the default snitch, rack-unaware placement, random partitioner, = and all nodes up, that's the primary replica, right? No. When all replicas have equal weight it's basically random. >> any given node X will never know whether another node Y has a row cached= or not. =A0the overhead for communicating that level of detail would be to= tally prohibitive. all caching does is speed the read, once a request is re= ceived for data local to a given node. =A0no more, no less. > > Yes, that's my concern, but the details significantly affect the effectiv= e size of the cache (in the afoorementioned case, the details place the eff= ective size at either 6 million or 18 million, a 3x difference). > > So given CL=3D=3DONE reads, only the actually read node (which will be th= e primary replica given the default placement strategy and snitch) will cac= he the item, right? The checksum-checking doesn't cause the row to be cache= d on the non-read nodes? You have to read the data, before you can checksum it. So on the contrary, digest (checksum) vs data read has no effect on cache behavior. > If I read with CL=3D=3DQUORUM in an RF=3D=3D3 environment, do both read n= odes them cache the item, or only the primary replica? Both. Which is what you want, otherwise your digest reads will cause substantial unnecessary i/o on hot keys. --=20 Jonathan Ellis Project Chair, Apache Cassandra co-founder of Riptano, the source for professional Cassandra support http://riptano.com