Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 34267 invoked from network); 15 Mar 2011 18:42:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Mar 2011 18:42:54 -0000 Received: (qmail 20772 invoked by uid 500); 15 Mar 2011 18:42:53 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 20722 invoked by uid 500); 15 Mar 2011 18:42:53 -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 20673 invoked by uid 99); 15 Mar 2011 18:42:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Mar 2011 18:42:53 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.220.180 as permitted sender) Received: from [209.85.220.180] (HELO mail-vx0-f180.google.com) (209.85.220.180) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Mar 2011 18:42:46 +0000 Received: by vxk12 with SMTP id 12so1044759vxk.11 for ; Tue, 15 Mar 2011 11:42:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=0HMflKMLvm9ZrTg53bEksQj3iOQogyqDaPtOtkUoaVY=; b=Z9Yp05CCLPN7RNQuvTKq8/ICLkhpWhhq3Xhh9Ad+iUuXG6vDYrOJW6EQ7xNBatOTIK 0P7Yu5q7V3wY85jgvQFjVSabY+zUUogH5/95S7IezBCZtQfoLxQuW2hQLfal1UzGr23t tIBwMYzQs3op1moR7UufdsDGYtJf8TVyy2r7Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=ZFz3fFOjS72RyYPXs7K9UitmTyy1vj4+WemZWrbjx9FXQ24okcNUk9paoUC/ruVFdE IDqWV/WD1roJl6gxyJsyy4LUwvQtcoxA+8VMyEHrNoqqZgeg2uqQ4oMK2oqGWZ1wreRw 9hJK5FXT4jwiKI8xmhFEe3SSIrpIgZngwqjqA= Received: by 10.52.93.233 with SMTP id cx9mr4128194vdb.128.1300214545167; Tue, 15 Mar 2011 11:42:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.157.9 with HTTP; Tue, 15 Mar 2011 11:41:45 -0700 (PDT) In-Reply-To: References: From: Paul Davis Date: Tue, 15 Mar 2011 14:41:45 -0400 Message-ID: Subject: Re: Some CouchDB internals questions? To: user@couchdb.apache.org Cc: Zdravko Gligic Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Mar 15, 2011 at 2:37 PM, Zdravko Gligic wrote: > Folks, > > I created a sample proof of concept app and it created more questions > than it answered with regard to CouchDB and resource usage. =A0From the > best that I can tell, some 1,500 docs which are about 500 characters > in size (in terms of readable text) to maybe 1k at most are being > bloated to an average of 10k per doc - with just 2 'plain' views and a > 3rd view that re-emits the doc as well. > > So, is there any literature around that explains at least a bit some > of the CouchDB internals, in terms of at least disk usage. =A0How much > might each byte end up taking to store (with whatever built-in > overhead) in a doc and what about views and indexing? Are there any > even very generalized formulas like multiply all bytes in index by 2 > and add 10 bytes for each filed/attribute in index and then add 1k if > you are building indices on a cloudy day ;?) > > Thanks for your help, > Zdravko > Have you compacted your db and views? There's unfortunately no direct way to calculate a upper threshold, it really depends on your method for inserting as well as how often you compact. This is due to the tail append storage which will orphan data in the file as it writes new records to the various internal data structures.