Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 75158 invoked from network); 14 Oct 2009 23:54:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Oct 2009 23:54:26 -0000 Received: (qmail 28976 invoked by uid 500); 14 Oct 2009 23:54:25 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 28900 invoked by uid 500); 14 Oct 2009 23:54:24 -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 28889 invoked by uid 99); 14 Oct 2009 23:54:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Oct 2009 23:54:24 +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 209.85.210.192 as permitted sender) Received: from [209.85.210.192] (HELO mail-yx0-f192.google.com) (209.85.210.192) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Oct 2009 23:54:11 +0000 Received: by yxe30 with SMTP id 30so487134yxe.29 for ; Wed, 14 Oct 2009 16:53:50 -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=3u7O1jTFAv4ZjDVWVz+lXcHsxqzqGMgAKT09nVB5594=; b=vY9e0PfBUkjm+DLGUIalkxahyFMZUXLgd8IaJIkEQCnjdpDndWiHwmBvQHl+12G+Ai bLuz+Z7qxIIX7OUfCsI2qJyM9RK4NXn04PsjAnwAXr5/3hzuu77cUhfigr7O3f08mKZK DbNm2R5tXFPuo/5WsE+nYIQgRvd3OVbOxDtkI= 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=ISe6dmAHmmQ7QmCOPMZ1koX7uP+p7EJMzy4hf5enMSo8BwmHyIJ14vCkJ9PN2ggmPK Ggbgre5rGMxuvE00YU9gYnOxdcXsayEEw3Kvvo73MMXhm4KXHZ6VbIg75gZRgC2AfVWj bhxy1+qvQz8VNE8crcZN8l6ucWS5VZhn+NT1Q= MIME-Version: 1.0 Received: by 10.101.194.8 with SMTP id w8mr8016397anp.190.1255564430434; Wed, 14 Oct 2009 16:53:50 -0700 (PDT) In-Reply-To: <6cfccb3d0910141648p3dd7f56cs55a0645d47cee0a@mail.gmail.com> References: <9FAB7E63-1917-4ABF-88BE-214328DC7EA9@metaweb.com> <83735A1C-46EE-419E-8D3F-E2F7839F7D22@metaweb.com> <6cfccb3d0910141648p3dd7f56cs55a0645d47cee0a@mail.gmail.com> Date: Wed, 14 Oct 2009 19:53:50 -0400 Message-ID: Subject: Re: insert performance From: Paul Davis 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 Glenn, CouchDB will already create subdirectories for db's with /'s. Though its not as automatic it'll allow for clients to do exactly the structure you're thinking of. HTH, Paul On Wed, Oct 14, 2009 at 7:48 PM, Glenn Rempe wrote: > Millions op DB's? > > Wouldn't you run into filesystem limitations due to the fact that > CouchDB writes all of its DB's/indexes into a single dir? > > e.g For the ext3 filesystem "There is a limit of 31998 sub-directories > per one directory, stemming from its limit of 32000 links per inode." > > http://en.wikipedia.org/wiki/Ext3 > > And my limited knowledge of filesystem internals says that the more > files you have in a single dir the longer it will take to seek on > those files. > > "The ext2 inode specification allows for over 100 trillion files to > reside in a single directory, however because of the current > linked-list directoryimplementation, only about 10-15 thousand files > can realistically be stored in a single directory. =A0This is why > systems such as Squid (http://www.squid-cache.org ) use cache > directories with many subdirectories - searching through tens of > thousands of files in one directory is sloooooooow." > > http://answers.google.com/answers/threadview/id/122241.html > > Of course this will vary by filesystem in absolute terms, but I think > the concept is the same for all current file systems. No? > > CouchDB might really be able to address this if it did something like > make subdirs under the couchdb data dir that were derived from > portions of a hash of the filename. =A0Using such a 2 or 3 level deep > dir structure would indeed allow for a huge number of DB's. > > e.g. if the db name hashes to a123df4g34fd.couch > > Make dirs/files like: > > DATA_DIR/a1/12/3d/f4g34fd.couch =A0# DB > DATA_DIR/a1/12/3d/.some_view_index_hidden_dir =A0# view index > > No? > > On Tue, Oct 13, 2009 at 3:59 PM, Chris Anderson wrote= : >> On Tue, Oct 13, 2009 at 6:29 AM, Brian Karlak wrote= : >>> >>> One caveat, however: we have one (somewhat funky) usecase which creates= a >>> large number of small databases. =A0Could the existence of several thou= sand >>> small databases affect performance? >>> >> >> We definitely support the many-databases use case (eg: 1 per user, aka >> millions of databases). I think there is extra support for that in >> 0.9.1, and of course 0.10 has only improved from there. >> >> Chris >> >> >> -- >> Chris Anderson >> http://jchrisa.net >> http://couch.io >> > > > > -- > Glenn Rempe > > email =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 : glenn@rempe.us > voice =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 : (415) 894-5366 or (415)-89G-LENN > twitter =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0: @grempe > contact info =A0 =A0 =A0 =A0: http://www.rempe.us/contact.html > pgp =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0: http://www.rempe.us/gnupg.tx= t >