Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 56450 invoked from network); 7 Jul 2009 19:16:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Jul 2009 19:16:08 -0000 Received: (qmail 65383 invoked by uid 500); 7 Jul 2009 19:16:17 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 65332 invoked by uid 500); 7 Jul 2009 19:16:16 -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 65322 invoked by uid 99); 7 Jul 2009 19:16:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2009 19:16:16 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of adam.kocoloski@gmail.com designates 209.85.216.190 as permitted sender) Received: from [209.85.216.190] (HELO mail-px0-f190.google.com) (209.85.216.190) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jul 2009 19:16:07 +0000 Received: by pxi28 with SMTP id 28so32002pxi.13 for ; Tue, 07 Jul 2009 12:15:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=7napzCnVqA6GNQ1z+QAn/dLYSLv8P4cjWV+Tjx/YODE=; b=jtSnDrvX7b/ZL7A142vXgU1eBgxLJMtL9S6PVYDTXu6uyb1ux6vuSaeWB/wMRMtALh gXnwVWWpY1ixiuZWEWi3SBPBrVap29hkleqqHmFTZUc7RpWhHv2xuBZfUbb0HGkY5Nol VQLzrtKPcsfRgWEV9HRNkAmf0gXv7MqLPoOR0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=AeE1GtZCgMq6P3ydWS2BwrC3K0wkcEfVE4scgRvYOEJa7ir48mevzjjPQD8QSwpCcn YfDaaCMQe253QgXh5oHx3nBVKi9lvMVj6JJEvWgvjIOkUfqKqW41foaYumVNCJcsSXsB /6zTG24kvS5djpGYGNpFXE3Vi9KbG/EK7Lres= Received: by 10.141.34.12 with SMTP id m12mr3002842rvj.149.1246994147402; Tue, 07 Jul 2009 12:15:47 -0700 (PDT) Received: from ?10.0.1.2? (c-66-31-20-188.hsd1.ma.comcast.net [66.31.20.188]) by mx.google.com with ESMTPS id l31sm6085176rvb.13.2009.07.07.12.15.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 07 Jul 2009 12:15:46 -0700 (PDT) Sender: Adam Kocoloski Message-Id: <830466B8-361B-47A4-89AE-1990FD4CBBD8@apache.org> From: Adam Kocoloski To: user@couchdb.apache.org In-Reply-To: <22E9DC658696E640A074D8B363795BE62D6C5C1C54@mail1.ABACA.local> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: view size extremely disk inefficient Date: Tue, 7 Jul 2009 15:15:42 -0400 References: <22E9DC658696E640A074D8B363795BE62D6C5C1C54@mail1.ABACA.local> X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org On Jul 7, 2009, at 2:56 PM, Peter Hsu wrote: > I need help explaining why the sizes of my views are so large. > > The emitted rows for the document have a key length of about 40 > bytes (it's an array, if that matters) and a view length of about > 400 bytes (raw json). However, I'm seeing over 2k/row average over > the view. Factoring in the overhead of writing the btrees still > doesn't really make sense. > > At 10M docs, I have almost 3.2k/message. The views were generated > at 3000 doc increments. At the beginning, with the first view > generation, the view size was about 2MB. This is about 800 bytes > per row, which could be reasonable. > > I measured the incremental size of the view after every 3000 rows > were added to the view. By the time I'm at 30k rows, I'm seeing an > increment in the view size of 4MB, which is over 1k/doc. By the end > of 10M messages, it's over a 10MB increment, which is over 3k/doc. > > It may be interesting that a lot of my keys are identical. Does > that affect things? > > This is with the 0.9.0 running on cent5 (64 bit). > > Peter Hi Peter, have you tried compacting the view? POST /dbname/_compact/designname Best, Adam