Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 14939 invoked from network); 5 Jul 2010 18:19:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Jul 2010 18:19:14 -0000 Received: (qmail 12036 invoked by uid 500); 5 Jul 2010 18:19:14 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 11949 invoked by uid 500); 5 Jul 2010 18:19:13 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 11941 invoked by uid 99); 5 Jul 2010 18:19:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jul 2010 18:19:13 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,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 jchris@gmail.com designates 209.85.212.180 as permitted sender) Received: from [209.85.212.180] (HELO mail-px0-f180.google.com) (209.85.212.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jul 2010 18:19:05 +0000 Received: by pxi3 with SMTP id 3so284216pxi.11 for ; Mon, 05 Jul 2010 11:17:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:mime-version :content-type:subject:date:in-reply-to:to:references:message-id :x-mailer; bh=k641TVL9WOQGbagOt+R13uiFB5tGrkBg6XhOZBU01tc=; b=DLW81E9Q3Fg0wTVnKamSS4J79zPNX4EORhfG/uRxfTobozNrPLj2Am9ewPJu8baxao bfojF0oiEssfgdR9rZvk+sMVmIxep/bs+qOmom93YcZmvnZ3ig/N5J9BHuoQjnOKTq+I M4d75UAILpSC4UQY/G3rk3rr7KZRIlfYWI3co= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; b=jO8mv9EYvNRtl8elEKuWp1Yi5Ab6uxjtM/bjNK2Zbb536p5fvuaij7evS1bXiPfkTP Y/u/4PMJksaUFtsYo9uTN9wqTcS8jr+P7fpt/RQx8DKhMrHkZZczUHj+QpmwGvRkQndr eyRliYlhR4u0hEWVPbKmtsMS2zDAEH/TqnTf8= Received: by 10.114.74.16 with SMTP id w16mr3681344waa.71.1278353863550; Mon, 05 Jul 2010 11:17:43 -0700 (PDT) Received: from [192.168.1.102] (c-98-248-172-14.hsd1.ca.comcast.net [98.248.172.14]) by mx.google.com with ESMTPS id k23sm67958152waf.17.2010.07.05.11.17.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 05 Jul 2010 11:17:42 -0700 (PDT) From: J Chris Anderson Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: multipart/alternative; boundary=Apple-Mail-3--601050620 Subject: Re: delayed_commits false Date: Mon, 5 Jul 2010 11:17:39 -0700 In-Reply-To: To: dev@couchdb.apache.org References: <4C31FF1A.30002@gmail.com> Message-Id: <7B20AA6A-CB1B-4E30-A4B6-4853B72922B2@gmail.com> X-Mailer: Apple Mail (2.1081) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-3--601050620 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii For a relatively sane look at the tradeoff's we're talking about, this = is a good resource: http://developer.postgresql.org/pgdocs/postgres/runtime-config-wal.html I wish it was simple to write a heuristic which would detect single = serialized client workloads, and delay commits, but I don't think it is. I lean (slightly) toward leaving delayed_commits =3D true because the = worst case scenario, even in the case of a crash, isn't data corruption, = just lost data from the most recent activity. It is also worth noting that there is an API to ensure_full_commit aside = from the configuration value, so if you have high-value data you are = writing, you can call ensure_full_commit (or use a header value to make = the last PUT or POST operation force full commit) I think this is worth discussing. I'm not strongly in favor of the = delayed_commit=3Dtrue setting, but I do think it is slightly more = user-friendly... Chris On Jul 5, 2010, at 10:02 AM, Mikeal Rogers wrote: > For the concurrent performance tests I wrote in relaximation it's = actually > better to run with delayed_commits off because it measures the = roundtrip > time of all the concurrent clients. >=20 > The reason it's enabled by default is because of apache-bench and = other > single writer performance test tools. =46rom what I've seen, it = doesn't > actually improve write performance under concurrent load and leads to = a kind > of blocking behavior when you start throwing too many writes at it = than it > can fsync in a second. The degradation in performance is pretty huge = with > this "blocking" in my concurrent tests. >=20 > I don't know of a lot of good concurrent performance test tools which = is why > I went and wrote one. But, it only tests CouchDB and people love to = pick up > one of these tools that tests a bunch of other dbs (poorly) and be = like > "CouchDB is slow" because they are using a single writer. >=20 > But, IMHO it's better to ship with more guarantees about consistency = than > optimized for crappy perf tools. >=20 > -Mikeal >=20 > On Mon, Jul 5, 2010 at 8:49 AM, Volker Mische = wrote: >=20 >> Hi All, >>=20 >> delayed_commits were enabled to have better performance especially = for >> single writers. The price you pay for is that you potentially lose up = to one >> second of writes in case of a crash. >>=20 >> Such a setting makes sense, though in my opinion it shouldn't be = enabled by >> default. I expect* that people running into performance issues at = least take >> a look at the README or a FAQ section somewhere. There the = delayed_commit >> setting could be pointed out. >>=20 >> I'd like to be able to say that on a vanilla CouchDB it's hard to = lose >> data, but I can't atm. I'm also well aware that there will be plenty = of >> performance tests when 1.0 is released and people will complain (if >> delayed_commits would be set to false by default) that it is horrible = slow. >> Though safety of the data is more important for me. >>=20 >> If the only reason why delayed_commits is true by default are the >> performance tests of some noobs, I really don't think it's a price = worth >> paying. >>=20 >> *I know that in reality people don't >>=20 >> I would like to see delayed_commits=3Dfalse for 1.0 >>=20 >> Cheers, >> Volker >>=20 --Apple-Mail-3--601050620--