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 77EE99291 for ; Thu, 27 Oct 2011 08:56:29 +0000 (UTC) Received: (qmail 46413 invoked by uid 500); 27 Oct 2011 08:56:28 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 46374 invoked by uid 500); 27 Oct 2011 08:56:27 -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 46365 invoked by uid 99); 27 Oct 2011 08:56:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2011 08:56:25 +0000 X-ASF-Spam-Status: No, hits=0.4 required=5.0 tests=FREEMAIL_FROM,FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cgsmcmlxxv@gmail.com designates 74.125.82.180 as permitted sender) Received: from [74.125.82.180] (HELO mail-wy0-f180.google.com) (74.125.82.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2011 08:56:16 +0000 Received: by wyg24 with SMTP id 24so3614213wyg.11 for ; Thu, 27 Oct 2011 01:55:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=IU0roye5QOP4M/9aPMyjWOXX8rEcKVOavJkviFzFLbA=; b=GIXOAFcSMIn1cxL3rz5to963+uFSXhq063PBNKij0G1Vd/yEQ+M+Ir2LgmKsoS/J5j V43WHW8W4dFM/TZ++bvo2f3rk/nuAD/teWORmaANmsjj4mKANr3vu0Gbe9RmfEi62wJf p5+wyWZnym/hpFu11weccB+wHQB5dTnSZan4Y= Received: by 10.227.208.71 with SMTP id gb7mr14665491wbb.7.1319705755890; Thu, 27 Oct 2011 01:55:55 -0700 (PDT) Received: from [192.168.1.100] (dynamic-62-87-247-18.ssp.dialog.net.pl. [62.87.247.18]) by mx.google.com with ESMTPS id l20sm8015435wbo.6.2011.10.27.01.55.53 (version=SSLv3 cipher=OTHER); Thu, 27 Oct 2011 01:55:54 -0700 (PDT) Message-ID: <4EA91C98.4060707@gmail.com> Date: Thu, 27 Oct 2011 10:55:52 +0200 From: CGS User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: High latency (40ms) and low request rate (10 rps) under windows References: <31406785.20111025232214@imarto.net> <4EA7178D.40007@gmail.com> <101780326.20111026011900@imarto.net> <4EA7AF0F.80007@gmail.com> <1002823249.20111027032054@imarto.net> <4EA905B4.5000904@gmail.com> <883747569.20111027120911@imarto.net> In-Reply-To: <883747569.20111027120911@imarto.net> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org English is not my native language as well, so, it may be that I misunderstood your point. That is the general case with or without your specific intervention. Nevertheless, writing directly on the harddisk is not quite the best practice because you reduce the life of your harddisk to at least half (I've experienced such practices and I've seen some monstrous results). In addition, as far as I understood how CouchDB works, writing one-by-one documents forces the two headers to be updated every time one document arrives, while buffering the documents and flush them on the harddisk at once requires one update session for the two headers. So, you have to balance your design in between speed and safety of your data. But, as long as you don't expect power failure (a little bit of optimism here, I know) and you take care of not trying to use more resources than you have, buffering will lose no data if your application is write-safe (e.g., check for integrity of the operation before discarding the data from the buffer and use of 2 buffers: one as accumulator and one for interfacing with the writing part). I know that's a bit of extra-work here and you use more resources, but it provides a good quantification of your data transfer toward your harddisk. Using this and the power of CouchDB of fast recovering from errors, my impression is that those 10 docs per second rate drawback can be ignored. But, of course, that's my opinion and it is subject of less objectivity. Well, I know you have lot of experience and I hope you don't take this post as a lecture (far from me to lecture anyone as long as I need to learn more), but as a more detailed opinion to support my previously expressed suggestion. I hope I didn't bore you to death with this post. Cheers, CGS On 10/27/2011 10:09 AM, Konstantin Cherkasov wrote: >> I do not quite understand why to lose 1 day from your customer data. > Excuse my English. > I meant "one day" = "once" in the sense that buffer usually does not assume durability. > In other words, if you choose to buffer the data then you are ready that > there is a probability the data can be lost. >