Return-Path: Delivered-To: apmail-incubator-couchdb-user-archive@locus.apache.org Received: (qmail 37079 invoked from network); 17 Jun 2008 22:34:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Jun 2008 22:34:24 -0000 Received: (qmail 91219 invoked by uid 500); 17 Jun 2008 22:34:25 -0000 Delivered-To: apmail-incubator-couchdb-user-archive@incubator.apache.org Received: (qmail 91197 invoked by uid 500); 17 Jun 2008 22:34:25 -0000 Mailing-List: contact couchdb-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-user@incubator.apache.org Delivered-To: mailing list couchdb-user@incubator.apache.org Received: (qmail 91186 invoked by uid 99); 17 Jun 2008 22:34:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2008 15:34:25 -0700 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 schickb@gmail.com designates 64.233.166.176 as permitted sender) Received: from [64.233.166.176] (HELO py-out-1112.google.com) (64.233.166.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2008 22:33:33 +0000 Received: by py-out-1112.google.com with SMTP id u52so2106667pyb.13 for ; Tue, 17 Jun 2008 15:33:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=4tO1lCjhWnPJuGF3ip+u7C8ywvRIdtesQ3j1wvILsdU=; b=AzZcrJo4fp1vkVZxX/YrEZetN25bZbxHvzKhw0ZhefnZwAveRFlBOPEt6Exl0I7lb/ 3/ZGuU8VXxL/fA0Dn+wJZRUMT9pc3HM79WEEXUkhF1eyGeEEVIurbAbGl+QCc0SyL+LO jrmo2Qzgd/mQXbGiDTnr6bg2PgGRtP+bdlcBE= DomainKey-Signature: a=rsa-sha1; c=nofws; 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; b=B9NPwrYLBjnHt0KLj3+Mjivi6ipdBH1Eu6lT1WSJis7W+dNfCYJefEqDsoM4AH7NNi uR9lfrYHTHxRUqc8L2ZoXXFndFSB4gO0+/sGXe6oBgV49t2OyEi5+xVRu7d3On7IUUTh HQWMzW9FfYtzCDgN6Jy28kh9eJfv0dc5Tp5xs= Received: by 10.114.154.12 with SMTP id b12mr8792269wae.153.1213742030919; Tue, 17 Jun 2008 15:33:50 -0700 (PDT) Received: from ?192.168.1.2? ( [71.212.28.28]) by mx.google.com with ESMTPS id n32sm12334923wag.47.2008.06.17.15.33.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 17 Jun 2008 15:33:50 -0700 (PDT) Message-ID: <48583BA6.1050507@gmail.com> Date: Tue, 17 Jun 2008 15:33:10 -0700 From: Brad Schick User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: couchdb-user@incubator.apache.org Subject: Re: Bad write performance References: <48580C64.40806@gmail.com> In-Reply-To: <48580C64.40806@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 06/17/2008 12:11 PM, Brad Schick wrote: > I am seeing very poor write performance running CouchDB on Ubuntu Linux > 8.04. I built CouchDB from source about a week ago, and I am using the > Python wrapper to access it all on localhost. > > I am trying to add over 90,000 documents (each is about 400 bytes) and > finding that I can only add about 16 documents per second. And while > this is happening, my CPU is about 75% idle. > I'm running these tests on an old machine running a Gnome desktop, so it is not a clean environment, but it seems like the bottleneck should still be apparent. So far disk access looks like the most likely issue. Running a single writer client, I get the following results from 'iostat -x sdb -k 1' avg-cpu: %user %nice %system %iowait %steal %idle 21.00 0.00 7.00 1.00 0.00 71.00 Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util sdb 0.00 0.00 0.00 78.00 0.00 326.50 8.37 0.77 10.00 9.54 74.40 Although it doesn't look totally saturated, I found a fairly similar maximum %util running 'stress -d 1 --hdd-bytes 400' (many small disk writes). Here is the output of 'vmstat 1' with one writer client running procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 1 0 39224 589712 40 156556 0 0 0 321 502 873 23 9 67 1 0 0 39224 589656 40 156624 0 0 0 321 388 630 24 6 69 1 0 0 39224 589492 40 156680 0 0 0 279 460 804 23 6 70 1 0 0 39224 589476 40 156740 0 0 0 277 370 575 20 8 71 1 The only real differences between that and "idle" (shown below) are the blocks-out a small amount of iowait. procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 0 0 39224 581296 40 167920 0 0 0 10 305 570 3 3 94 0 0 0 39224 581296 40 167920 0 0 0 0 194 306 3 1 96 0 0 0 39224 581296 40 167920 0 0 0 0 283 528 3 2 95 0 0 0 39224 581296 40 167920 0 0 0 0 193 297 3 0 97 0 I'm not sure what else to check from the OS. I found erlang's fprof (http://www.erlang.org/doc/man/fprof.html), but I haven't tried to figure how to start couchdb in that environment. I'll test block updates next. -Brad