Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 32239 invoked from network); 25 May 2010 11:04:58 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 May 2010 11:04:58 -0000 Received: (qmail 8251 invoked by uid 500); 25 May 2010 11:04:57 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 8217 invoked by uid 500); 25 May 2010 11:04:54 -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 8203 invoked by uid 99); 25 May 2010 11:04:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 May 2010 11:04:53 +0000 X-ASF-Spam-Status: No, hits=1.7 required=10.0 tests=AWL,FREEMAIL_FROM,HTML_MESSAGE,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 greenemj@gmail.com designates 209.85.222.199 as permitted sender) Received: from [209.85.222.199] (HELO mail-pz0-f199.google.com) (209.85.222.199) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 May 2010 11:04:48 +0000 Received: by pzk37 with SMTP id 37so4157887pzk.27 for ; Tue, 25 May 2010 04:04:28 -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; bh=U3Nz+ddB3AuNNZMK7+Abe4RNDJ3OSuzTWyFiRKPEALU=; b=Uqdb0Q8PNabYe1J2fAaadWsIlsp3otHlvU61H11L03ODO2qAWcHdhIYKyGUU1lSsNG Nu7GL9nKVjE0Q4KknGsHmSfiNa6yO0ijCUUgUnuJ9ScEmqWWxIlihMek/X+izwI9NEcP yyKAXbGSYrmjEn0b8NqqiYrmfd4fz+RuRkI1w= 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; b=MpzhRo25Wu8Z/+V/L+Cj4Tm/gCbs9hOI6RCjLqhYEMvau91lvmp5dPY/xibaZFWR2u SBcgi2T2olQZh9gXUKP5DYh8QnrMtTw9LoCXPyH2j2fPjdNXfzy8oZ6fySPbzo/CZOMh ykjfx9yKXbS4y0A29jklvNjNHZsRbNcl60+u4= Received: by 10.141.105.19 with SMTP id h19mr5043272rvm.281.1274785468095; Tue, 25 May 2010 04:04:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.248.17 with HTTP; Tue, 25 May 2010 04:04:08 -0700 (PDT) In-Reply-To: References: From: Mark Greene Date: Tue, 25 May 2010 07:04:08 -0400 Message-ID: Subject: Re: Why are writes faster than reads? To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=000e0cd13beefd9e300487691e68 --000e0cd13beefd9e300487691e68 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I'm fairly certain the write path hits the commit log first, then the memtable. 2010/5/25 Peter Sch=FCller > > I have seen several off-hand mentions that writes are inherently faster > than > > reads. Why is this so? > > I believe the primary factor people are referring to is that writes > are faster than reads in terms of disk I/O because writes are > inherently sequential. Writes initially only happen in-memory plus in > a (sequentially written) commit log; when flushed out to an sstable > that is likewise sequential writing. > > Reads on the other hand, to the extent that they go down to disk, will > suffer the usual overhead associated with disk seeks. > > See http://wiki.apache.org/cassandra/ArchitectureInternals for details. > > -- > / Peter Schuller aka scode > --000e0cd13beefd9e300487691e68 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I'm fairly certain the write path hits the commit log first, then the m= emtable.

2010/5/25 Peter Sch=FCller <scode@spotify.com= >
> I have seen several off-hand mentions that writes are inherently fast= er than
> reads. Why is this so?

I believe the primary factor people are referring to is that writes are faster than reads in terms of disk I/O because writes are
inherently sequential. Writes initially only happen in-memory plus in
a (sequentially written) commit log; when flushed out to an sstable
that is likewise sequential writing.

Reads on the other hand, to the extent that they go down to disk, will
suffer the usual overhead associated with disk seeks.

See http://wiki.apache.org/cassandra/ArchitectureInternals fo= r details.

--
/ Peter Schuller aka scode

--000e0cd13beefd9e300487691e68--