Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 45761 invoked from network); 4 May 2009 16:08:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 May 2009 16:08:46 -0000 Received: (qmail 20353 invoked by uid 500); 4 May 2009 16:08:45 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 20274 invoked by uid 500); 4 May 2009 16:08:45 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 20264 invoked by uid 99); 4 May 2009 16:08:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 May 2009 16:08:45 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.joseph.davis@gmail.com designates 74.125.46.31 as permitted sender) Received: from [74.125.46.31] (HELO yw-out-2324.google.com) (74.125.46.31) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 May 2009 16:08:35 +0000 Received: by yw-out-2324.google.com with SMTP id 2so2051403ywt.5 for ; Mon, 04 May 2009 09:08:14 -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=tBb5qm6mcGFXVgBX9btiMW6wi0ldgoctfGRTeY+NqLk=; b=Kp2MWgPe4nfsoR3u8zlcJO6BGRNt/yI5Kf4s7Ch3eJnfzQ9vJwy024NXM7Lt8sfvgd 86BoyDnLQdyOemLb354tKPrJqJy2E4/G1JU3ruX1gNim5Ur1du4G5utMWKPNXMW4cjhI zlNdn/EZTvUiUCr1ybGPYU8hvN4Tp2GL4ncn8= 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=MXbBEI1Sve0Cr3A/HHTCTCzmUjo71EB/HlC3eRYGzdqWuNlEn/fb5A72FzPTQ1tvlI pwb2TIuWDpfj9gfJ4HZB1P4S9tqxROPxlS0A188FEIpsiIqPSi6ZW2Lq05eGQozH/oPz ZrzO9qyVskJ0qOBjXmy9t6/XB9ixKAaxykm/A= MIME-Version: 1.0 Received: by 10.100.44.4 with SMTP id r4mr13116040anr.157.1241453293957; Mon, 04 May 2009 09:08:13 -0700 (PDT) In-Reply-To: References: <4a29064f0905040450j13b9ffedq505d0fc3e7ac1e5c@mail.gmail.com> <24961DEF-EAFC-4765-AFBB-AF15AA67629D@apache.org> Date: Mon, 4 May 2009 12:08:13 -0400 Message-ID: Subject: Re: couchdb on smp? From: Paul Davis To: user@couchdb.apache.org Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Also a point I forgot to make explicit is that the erlview engine doesn't require any JSON serialization in either direction obviously. So in the end it'll probably be what you want if you're going for pure speed anyway. Paul On Mon, May 4, 2009 at 12:07 PM, Paul Davis w= rote: > On Mon, May 4, 2009 at 11:58 AM, Chris Anderson wrote= : >> On Mon, May 4, 2009 at 7:23 AM, Zachary Zolton wrote: >>> @janl >>> >>> Perhaps he's asking why there's no activity on the other processor? >>> >>> I think his expectation here is that Map-Reduce would be parallelized. >>> Correct me if I'm wrong, but CouchDB does not yet exploit parallelism >>> in view indexing yet, right? >>> >> >> Correct. And the JavaScript view server doesn't make it easy to do so >> without starting multiple OS processes per map-function. I can see >> this being nifty down the road, but it's an optimization. >> >> However, interest is growing in an Erlang view server, and >> http://github.com/mmcdanie/erlview points out that the view process >> architecture could use some changes to make Erlang views parallel. >> Those changes will in turn make it more trivial to parallelize JS view >> computation, in the cases that need it. So I can see us getting to >> parallel JS views, but I think the cleaner way to get there is to >> start with proper Erlang views. >> > > I'd also throw in that the biggest bottleneck for JS views is probably > the JSON serialization. I've been asked to try getting eep0018 in to a > copy of trunk as a configuration parameter. I'll get a branch on > github up by the end of the week to have a reference for that. My gut > feeling is that once we get that sorted out, we'll probably see that > disk I/O becomes the bottleneck. I could see maybe eeking out some > extra performance by streaming data through the map servers as opposed > to the serialized delegation method we're using now, but then it > becomes a cost/benfit of complexity. We'll see how it goes. > > Paul Davis > >>> =97zdzolton >>> >>> On Mon, May 4, 2009 at 7:46 AM, Jan Lehnardt wrote: >>>> Beam and couchjs pipe data back and =A0forth during view generation. W= hile the >>>> one works, the other waits. The scheduler is smart enough to keep the >>>> processes local to a single CPU. Otherwise it's be even more expensive= . >>>> >>>> Cheers >>>> Jan >>>> -- >>>> >>>> On 04.05.2009, at 12:50, Elf wrote: >>>> >>>>> Hello. >>>>> I'm using couchdb-0.9 (erlang 13.2) on my linux server with 4 CPUs >>>>> (Core 2 Quad). >>>>> Every time couchdb needs to reindex views, i see 2 serious processes >>>>> in htop - beam and couchjs. Each of them eats < 100% of 1 cpu, and su= m >>>>> of their usage is about (but not greater) 100% of 1 cpu (80/20, 70/30 >>>>> and so on). >>>>> Can somebody explain, why that 2 different processes (they have >>>>> differend PIDs) doesn't used different cpus - (one process for cpu)? >>>>> >>>>> >>>>> -- >>>>> ---------------- >>>>> Best regards >>>>> Elf >>>>> mailto:elf2001@gmail.com >>>>> >>>> >>> >> >> >> >> -- >> Chris Anderson >> http://jchrisa.net >> http://couch.io >> >