Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 97084 invoked from network); 13 May 2009 20:02:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 May 2009 20:02:04 -0000 Received: (qmail 29761 invoked by uid 500); 13 May 2009 20:02:03 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 29683 invoked by uid 500); 13 May 2009 20:02:03 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 29671 invoked by uid 99); 13 May 2009 20:02:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 May 2009 20:02:03 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of paul.joseph.davis@gmail.com designates 74.125.44.28 as permitted sender) Received: from [74.125.44.28] (HELO yx-out-2324.google.com) (74.125.44.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 May 2009 20:01:52 +0000 Received: by yx-out-2324.google.com with SMTP id 8so418538yxm.5 for ; Wed, 13 May 2009 13:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=afR4RVeCYm9Bjwm7L9D1ZVFki33jdEsEl5vGd5K/Um4=; b=pa1N7CNNRy/+vu/j5ExWEpGyfn2UC6gp+TGC+27GVoJfrNqmqOdD+UxWG0cOrKeCFF u5awjTrRS0vkja2UlVTnxS31B8iHwpl06SUH6jTdw9aqlYwCsvACzJx5ZSWOM6GUhkBM hgp+N1cRlNhr6eI0mJntKW2H5umx19fmu2hxg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=IvwHj8wPF68Km6qU3QzjqRTfnpSjkxdB/PlRCFk5aLL5rpcJ7n0y8Yss9NacIMTNCN DEWYx0MgML26tmTWSpoBPKpu3bXovqCwk28ygFMbcYOaEUTZv9K38q4iyAxGXmpmnDQw mK/fyFLYWyEvpYt63PzQEHmUHHHFuB80uTGic= MIME-Version: 1.0 Received: by 10.100.211.11 with SMTP id j11mr1922578ang.101.1242244891517; Wed, 13 May 2009 13:01:31 -0700 (PDT) In-Reply-To: References: Date: Wed, 13 May 2009 16:01:31 -0400 Message-ID: Subject: Re: chunkify profiling (was Re: Patch to couch_btree:chunkify) From: Paul Davis To: dev@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Adam, No worries about the delay. I'd agree that the first graph doesn't really show much than *maybe* we can say the patch reduces the variability a bit. On the second graph, I haven't the faintest why that'd be as such. I'll have to try and setup fprof and see if I can figure out what exactly is taking most of the time. Perhaps we're looking at wrong thing by reducing term_to_binary. You did say that most of the time was spent in size/1 as opposed to term_to_binary the other day which is hard to believe at best. I'll put this on the weekend agenda. Until I can show that its consistently faster I'll hold off. For reference, when you say 2K docs in batches of 1K, did you mean 200K? Also, note to self, we should check speeds for dealing with uuids too to see if the non-ordered mode makes a difference. Paul On Wed, May 13, 2009 at 3:33 PM, Adam Kocoloski wrote= : > Sorry for the delay on this front. =A0I ran hovercraft:lightning 20 times= each > with and without Paul's patch. =A0Each run inserted 2k docs in batches of > 1000. =A0Here are two plots showing the effect of the patch: > > http://dl.getdropbox.com/u/237885/insert_rate.png > http://dl.getdropbox.com/u/237885/chunkify_fraction.png > > The first plot histograms the insert rate for the two scenarios*. =A0I do= n't > really see much of a difference. =A0The second plot uses fprof to plot th= e > fraction of time the couch_db_updater process spent in chunkify and any > functions called by chunkify. =A0For those familiar with fprof, it's the = ratio > of ACC for couch_btree:chunkify/2 divided by OWN for the updater pid. =A0= If > fprof is to be believed, the trunk code is almost 2x faster. > > Adam > > * the reason the insert rate is so low is because fprof is running. =A0Tu= rning > off the profiler speeds things up by an order of magnitude, in accord wit= h > the numbers Chris has posted. >