Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2B5AC1026F for ; Mon, 4 Nov 2013 08:19:10 +0000 (UTC) Received: (qmail 51639 invoked by uid 500); 4 Nov 2013 08:19:07 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 51505 invoked by uid 500); 4 Nov 2013 08:19:01 -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 51485 invoked by uid 99); 4 Nov 2013 08:18:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Nov 2013 08:18:59 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bcitrin@gmail.com designates 209.85.220.44 as permitted sender) Received: from [209.85.220.44] (HELO mail-pa0-f44.google.com) (209.85.220.44) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Nov 2013 08:18:52 +0000 Received: by mail-pa0-f44.google.com with SMTP id fb1so6623661pad.17 for ; Mon, 04 Nov 2013 00:18:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=j21xiFIUTizj0codFm75x/VmpMum6SCXWTBizo2Myp0=; b=fD4J0TcAE3x+GmNhkEibB4GcdZ/bbYIZdqiWQ/1UjCHzstRBRZ0T++ZRRVrqvQCBgf tfQ9CcFOWJ8mWDcoO9IC/0E+Ig9bYKwxXHK3KxbnuB4T/tI3QRRUQqbOuNpgMS5BIXN8 /eP3KNPBKHPHihhyQSwkdLcW3EzpbStrf6JJJqn51V5Dq3eZ4IMcCgbMzuFTxIIvd+7k HK0r3iCNn5DZ7ZfSKcFpNTx+hUfPRKKENoDJyoCPlXg5hZOTjZoSsIaytiTQDSfPYJ4j QDfwb146T0fZkT8q8DN79wPxkojEGlQR1Xg9LQHElzt7S/0LsDrGVLqxt/WK++ubELZY gUCw== MIME-Version: 1.0 X-Received: by 10.68.170.225 with SMTP id ap1mr16640362pbc.117.1383553110587; Mon, 04 Nov 2013 00:18:30 -0800 (PST) Received: by 10.70.85.138 with HTTP; Mon, 4 Nov 2013 00:18:30 -0800 (PST) In-Reply-To: References: Date: Mon, 4 Nov 2013 10:18:30 +0200 Message-ID: Subject: Re: Finding the right value for compaction configuration parameters From: Boaz Citrin To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=047d7b6731faaf417104ea558f2d X-Virus-Checked: Checked by ClamAV on apache.org --047d7b6731faaf417104ea558f2d Content-Type: text/plain; charset=ISO-8859-1 View compaction averages of database of 1.5M docs (same one used for the previous tests) on a Dell Latitude laptop with Windows 7 64b OS, 8G RAM, Intel Core i7-3720QM CPU (2 * 2.6 GHz): keyvalue_buffer_size | average time (in minutes) ================================================ 2097152 | 0:56 4194304 | 0:52 8388608 | 0:55 16777216 | 0:59 33554432 | 1:00 67108864 | 1:07 134217728 | 1:22 268435456 | 1:45 Same database, this time on a desktop, Windows Server 2008 R2, 2GB RAM, Inter Xeon 3050 2*13 GHz: 2097152 | 2:30 4194304 | 2:11 8388608 | 2:18 16777216 | 2:33 33554432 | 2:55 67108864 | 4:15 134217728 | 5:43 268435456 | 6:42 Database has 3 views in different 3 design documents. Would like to know some numbers from others, to get an idea of good default values that can be assumed for various production environments. On Sun, Nov 3, 2013 at 10:02 AM, Boaz Citrin wrote: > More numbers... > > Same database, this time on a desktop, Windows Server 2008 R2, 2GB RAM, > Inter Xeon 3050 2*13 GHz. > > > checkpoint_after |doc_buffer_size | avg. compaction time (in minutes) > ==================================================================== > 41943040 | 4194304 | 17:26 > 83886080 | 8388608 | 12:01 > 167772160 | 16777216 | 9:34 > 335544320 | 33554432 | 8:56 > 671088640 | 67108864 | 9:26 (*) > 1342177280 | 134217728 | 10:20 > 2684354560 | 268435456 | 12:28 > > 671088640 | 4194304 | 17:25 > 671088640 | 8388608 | 12:17 > 671088640 | 16777216 | 10:15 > 671088640 | 33554432 | 8:56 > 671088640 | 67108864 | 9:20 (*) > 671088640 | 134217728 | 10:16 > 671088640 | 268435456 | 12:19 > > > > > > On Fri, Nov 1, 2013 at 5:44 PM, Boaz Citrin wrote: > >> OK some numbers when running compaction of a database of 1.5M docs on a >> Dell Latitude laptop with Windows 7 64b OS, 8G RAM, Intel Core i7-3720QM >> CPU (2 * 2.6 GHz). >> >> checkpoint_after |doc_buffer_size | avg. compaction time (in minutes) >> ====================================================== >> 41943040 | 4194304 | 6:11 >> 83886080 | 8388608 | 5:10 >> 167772160 | 16777216 | 4:49 >> 335544320 | 33554432 | 4:06 >> 671088640 | 67108864 | 3:34 (*) >> 1342177280 | 134217728 | 4:16 >> 2684354560 | 268435456 | 5:19 >> >> 671088640 | 4194304 | 5:39 >> 671088640 | 8388608 | 4:06 >> 671088640 | 16777216 | 3:44 >> 671088640 | 33554432 | 3:20 >> 671088640 | 67108864 | 3:16 (*) >> 671088640 | 134217728 | 3:44 >> 671088640 | 268435456 | 4:28 >> >> As you can see in the starred lines, same parameters might give different >> results, but I think the direction is clear; >> In my situation buffer of 64m gives the fastest compaction, and we also >> see that as expected the checkpoint size affects the compaction time as >> well. >> >> Note that this is NOT the time that an average daily compaction takes as >> I ran these consecutively, i.e. the database was initially not fragmented. >> >> >> >> On Sat, Oct 26, 2013 at 5:25 PM, Alexander Shorin wrote: >> >>> Feel free to post here! I think others would be also interested in >>> your experience and could share (I hope so) their own too. >>> -- >>> ,,,^..^,,, >>> >>> >>> On Sat, Oct 26, 2013 at 7:05 PM, Boaz Citrin wrote: >>> > Hi Alexander, >>> > >>> > Yes, I have some numbers, do you want me to share here or somewhere >>> else? >>> > >>> > Best, >>> > >>> > Boaz >>> > >>> > >>> > On Mon, Oct 21, 2013 at 12:32 AM, Alexander Shorin >>> wrote: >>> > >>> >> Hi Boaz! >>> >> >>> >> On Fri, Oct 18, 2013 at 12:57 AM, Boaz Citrin >>> wrote: >>> >> > Testing database compaction with various doc_buffer_size values I >>> get >>> >> > completely different results. >>> >> > Documentation is fairly vague, so I wonder how to choose the right >>> value; >>> >> > What parameters affect this - HD buffer size, average doc size, >>> >> > database size, fragmentation, etc... ?! >>> >> > >>> >> > Same goes for view compaction and keyvalue_buffer_size. >>> >> >>> >> These parameters does affect on what they are named: they defines >>> >> buffer size for copying data from db/view file to the .compact one. >>> >> What information you think is missed? >>> >> >>> >> > (For me the the compaction with default values was many times slower >>> >> > than with the values that gave the faster compaction). >>> >> >>> >> All numbers have their cost: large buffers requires more memory while >>> >> they reduces I/O operations and vice versa. Much likely, that default >>> >> values wouldn't provide you high performance since they aimed to fit >>> >> everyone, but that's why you may tweak them for your needs (: >>> >> >>> >> I believe, that it's possible to revise them, but first need to >>> >> collect information in what environment which values are effective and >>> >> which are not. Would you like to help us with that? >>> >> >>> >> >>> >> -- >>> >> ,,,^..^,,, >>> >> >>> >> >> > --047d7b6731faaf417104ea558f2d--