From user-return-18508-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Tue Oct 25 21:19:35 2011 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 9904996D8 for ; Tue, 25 Oct 2011 21:19:35 +0000 (UTC) Received: (qmail 20482 invoked by uid 500); 25 Oct 2011 21:19:34 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 20445 invoked by uid 500); 25 Oct 2011 21:19:34 -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 20437 invoked by uid 99); 25 Oct 2011 21:19:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2011 21:19:34 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of coxx@imarto.net designates 209.85.214.52 as permitted sender) Received: from [209.85.214.52] (HELO mail-bw0-f52.google.com) (209.85.214.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2011 21:19:26 +0000 Received: by bkbzs2 with SMTP id zs2so1376142bkb.11 for ; Tue, 25 Oct 2011 14:19:04 -0700 (PDT) Received: by 10.204.130.9 with SMTP id q9mr22179464bks.43.1319577544372; Tue, 25 Oct 2011 14:19:04 -0700 (PDT) Received: from PEA ([77.41.107.210]) by mx.google.com with ESMTPS id r12sm29215143bkw.5.2011.10.25.14.19.02 (version=SSLv3 cipher=OTHER); Tue, 25 Oct 2011 14:19:03 -0700 (PDT) Date: Wed, 26 Oct 2011 01:19:00 +0400 From: Konstantin Cherkasov X-Priority: 3 (Normal) Message-ID: <101780326.20111026011900@imarto.net> To: user@couchdb.apache.org Subject: Re: High latency (40ms) and low request rate (10 rps) under windows In-Reply-To: <4EA7178D.40007@gmail.com> References: <31406785.20111025232214@imarto.net> <4EA7178D.40007@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Hi! > 1. delayed_commits helps you in high concurrency (batch mode) and less=20 > in no concurrency. You are wrong. curl -X PUT -H "Content-Type: application/json" http://127.0.0.1:5984/_conf= ig/couchdb/delayed_commits -d "\"true\"" ab -k -c 1 -n 1000 -p ab.json -T "application/json" http://localhost:5984/b= ench Requests per second: 173.71 [#/sec] (mean) curl -X PUT -H "Content-Type: application/json" http://127.0.0.1:5984/_conf= ig/couchdb/delayed_commits -d "\"false\"" ab -k -c 1 -n 1000 -p ab.json -T "application/json" http://localhost:5984/b= ench Requests per second: 10.15 [#/sec] (mean) CPU & HDD utilization 0.01%. It looks like there are some delays in TCP or HTTP. > 2. If one wants to send in the same session lots of documents, that=20 > someone uses bulk operation. Otherwise, high concurrency comes in play=20 > by the means of batch mode. Well, in real life there are many cases when events or data come not in bat= ches but one by one. In truth, it seems to me that this BATCH MODE MANTRA leads to defects in th= e code that simply are not investigated. "OMG! My database do 10 requests per second (for ex. Postgres do 1000 rps o= n the same hardware with fsync on) "Forget this, just use BATCH MODE" --=20 Konstantin Cherkasov