Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 20952 invoked from network); 10 Aug 2009 13:54:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Aug 2009 13:54:06 -0000 Received: (qmail 5947 invoked by uid 500); 10 Aug 2009 13:54:10 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 5827 invoked by uid 500); 10 Aug 2009 13:54:10 -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 5774 invoked by uid 99); 10 Aug 2009 13:54:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Aug 2009 13:54:07 +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 norman.barker@gmail.com designates 209.85.210.204 as permitted sender) Received: from [209.85.210.204] (HELO mail-yx0-f204.google.com) (209.85.210.204) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Aug 2009 13:53:56 +0000 Received: by yxe42 with SMTP id 42so4059604yxe.13 for ; Mon, 10 Aug 2009 06:53:35 -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=CGN6NTl0/IrMCdxFC3c+r9rGHA0kv2HzmCBUC0vurQ8=; b=RlK13VEqFa23YPM7pxsFdS5HFyTaqnwYF0mvHX5IsfU/JpxMTo+zIUKdAsH/yLmfn5 3NySprLDAhb6He4ICzsPmQvBr7/cuYFKsysQzrTPWZGxqxO47BSSgU/c4QEIqbI1eX5I klFQrdCU7EDOngsC1QIOhe4dCR+jqRdcHm9pc= 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=IpY/yKeGhQHvyKMdwRfYuI/QM+VOU/AKQq4HCHvL0XBs1YTirS8bomW1XIlIQz2On3 I4Mqzrhueg3F31Av6+pukSZMQARrAuYRQ7IKdmWjsmf0PHdUBm8QK70CewTIxdByQ7lg q0PGAPTN6dZULCdJ5oKVZCpTjmWAomqHo44/I= MIME-Version: 1.0 Received: by 10.150.152.2 with SMTP id z2mr8382211ybd.90.1249912415456; Mon, 10 Aug 2009 06:53:35 -0700 (PDT) In-Reply-To: <921000908091913t68af7c3k3dcd8b60d9368d8c@mail.gmail.com> References: <921000908082201k5caa1cf6pf00283012f46457b@mail.gmail.com> <4A7E6542.10408@borwankar.com> <5A3FA940-B720-4B85-827F-CBC9142762C3@apache.org> <4A7EFBC4.2060402@borwankar.com> <31CC10A5-3C7D-4B7C-B65E-DCAFBD287246@apache.org> <921000908091425l6af7f04dvf7e486af1b4cfc7e@mail.gmail.com> <921000908091913t68af7c3k3dcd8b60d9368d8c@mail.gmail.com> Date: Mon, 10 Aug 2009 07:53:35 -0600 Message-ID: Subject: Re: couchdb on 8 core redhat/fedora From: Norman Barker To: user@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 I was a little surprised by this, and did a quick grep on spawn on the couchdb code base, it isn't used that much and I wonder why. In particular for bulk doc updates I wonder why pmap isn't used (perhaps I am missing something), for my project I have needed to write a custom updater, a pre-writer, (great modular design now btw in 0.9 I was able to hook it all up - updater, query server from the ini file) and I am going up to a javascript function to parse an incoming document (not JSON) into multiple JSON documents I am then using a pmap to write this to the db, doesn't seem to be that complicated and I should then get an increase in speed to compensate for the initial javascript parsing delay. Could all (or most) use of the plain map be replaced with a pmap in couchdb or am I missing something? Not to hijack this thread, but I have written a pre-writer, are there any plans to add filters (pre and post) on the couchdb roadmap? As a J2EE developer, I still see the benefit of the Erlang VM - easier to develop 'fast' applications in for sure. thanks, Norman On Sun, Aug 9, 2009 at 8:13 PM, Nitin Borwankar wrote: > I believe there are at least 4 spindles. =A0But I don't expect to be > continually writing or writing while generating indexes - this is meant t= o > be primarily a reference "datawarehouse" kind of read-only database - wri= tes > will happen in batch mode once a day for a couple of hours during which t= ime > no reads will be taking place. =A0All initial view generation will happen= when > no writes are taking place. > Having views on separate disk from db is a good suggestion =A0I'll see ab= out > the symlinks part as well. > > Thanks much all for all the info - this has been extremely useful and > helpful > > Nitin > > 37% of all statistics are made up on the spot > -------------------------------------------------------------------------= ------------ > Nitin Borwankar > nborwankar@gmail.com > > > On Sun, Aug 9, 2009 at 2:42 PM, Chris Anderson wrote: > >> On Sun, Aug 9, 2009 at 2:25 PM, Nitin Borwankar >> wrote: >> > On Sun, Aug 9, 2009 at 12:13 PM, Adam Kocoloski >> wrote: >> > >> >> >> >> Hi Nitin, Jan's right, if you're only building views from a single >> design >> >> doc you won't get much indexing speedup from multi-core at the moment= . >> =A0We >> >> do spawn multiple couchjs processes (often one does the map and the >> other >> >> the reduce), but we don't map docs out to them simultaneously or >> anything. >> >> =A0Also, the Erlang process communicating with couchjs blocks and wai= ts >> for >> >> the results when it sends data out. =A0Best, >> >> >> >> Adam >> >> >> > >> > Ok, so I could have multiple databases each with multiple design docs = and >> > make a number of requests and have a number of couchjs processes sprea= d >> out >> > across multiple cores right? >> > >> > I suppose what I am hearing is that views in a single design doc can >> become >> > a bottleneck but views in multiple design docs will get the benefit of >> > multiple couchjs processes. >> > >> > Since this part of my experiment is not couchapp based, I am completel= y >> fine >> > having a) multiple databases and b) multiple design docs per database. >> > >> >> Unless you have lots of disks, you won't gain performance from >> multiple dbs. However, you might do well you put views onto a >> different disk from the db file, if you'll be writing while generating >> indexes. or spread view files across disks with symlinks so disks >> don't have to seek as much to record view rows. >> >> > So this gives me the OS level scheduling of couchjs processes across >> cores, >> > I think. >> > >> > Nitin >> > >> > >> > >> > 37% of all statistics are made up on the spot >> > >> ------------------------------------------------------------------------= ------------- >> > Nitin Borwankar >> > nborwankar@gmail.com >> > >> >> >> >> -- >> Chris Anderson >> http://jchrisa.net >> http://couch.io >> >