From user-return-4782-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Fri May 08 17:48:07 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 82592 invoked from network); 8 May 2009 17:48:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 May 2009 17:48:06 -0000 Received: (qmail 96304 invoked by uid 500); 8 May 2009 17:48:05 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 96217 invoked by uid 500); 8 May 2009 17:48:05 -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 96207 invoked by uid 99); 8 May 2009 17:48:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 May 2009 17:48:05 +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: local policy) Received: from [128.200.36.30] (HELO translab.its.uci.edu) (128.200.36.30) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 May 2009 17:47:56 +0000 Received: from translab.its.uci.edu (localhost.localdomain [127.0.0.1]) by translab.its.uci.edu (8.13.1/8.12.10) with ESMTP id n48HlKxX008787 for ; Fri, 8 May 2009 10:47:22 -0700 Received: (from jmarca@localhost) by translab.its.uci.edu (8.13.1/8.13.1/Submit) id n48HlIA4008786 for user@couchdb.apache.org; Fri, 8 May 2009 10:47:18 -0700 Date: Fri, 8 May 2009 10:47:18 -0700 From: James Marca To: user@couchdb.apache.org Subject: Re: couchdb on smp? Message-ID: <20090508174718.GC2466@translab.its.uci.edu> Mail-Followup-To: user@couchdb.apache.org References: <4a29064f0905040450j13b9ffedq505d0fc3e7ac1e5c@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4a29064f0905040450j13b9ffedq505d0fc3e7ac1e5c@mail.gmail.com> User-Agent: Mutt/1.4.1i X-ITS-MailScanner: Found to be clean X-ITS-MailScanner-From: jmarca@translab.its.uci.edu X-ITS-Spam-Status: No X-Virus-Checked: Checked by ClamAV on apache.org Hello, I too am running couchdb-0.9 on erlang 13.2 I am running Gentoo. My use flags for erlang are: dev-lang/erlang-13.2-r1 USE="emacs java kpoll sctp smp ssl -doc -hipe -odbc -tk -wxwindows I didn't turn on high performance erlang because the ebuild said "your on your own if you do" But I turned on lots of other flags that looked like it would help erlang use all 8 cores on my server (dual 4-core Intel Xeon CPU E5420 @ 2.50GHz) So, I have 12 databases (one per month) for storing some data, each about gig or so large. I set up an identical view in each all at the same time and erlang + couch did a good job using my CPU---using top (press 1 to see all cpus), all 8 cpus were under load, with loads ranging from 49 to 61, and the main beam.smp process was running at 340% CPU (obviously spreading its load across the cores). So if you're not seeing CPUs getting used, try recompiling erlang and turning on smp support, etc. Oh, and I also had to recompile CouchDB after upgrading erlang with smp kpoll and sctp. Cheers James Marca On Mon, May 04, 2009 at 02:50:26PM +0300, 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 sum > 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 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.