Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 53141 invoked from network); 16 Sep 2009 08:23:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Sep 2009 08:23:13 -0000 Received: (qmail 41060 invoked by uid 500); 16 Sep 2009 08:23:12 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 40959 invoked by uid 500); 16 Sep 2009 08:23:12 -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 40949 invoked by uid 99); 16 Sep 2009 08:23:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Sep 2009 08:23:11 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [83.97.50.139] (HELO jan.prima.de) (83.97.50.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Sep 2009 08:23:00 +0000 Received: from [10.0.1.5] (f053044196.adsl.alicedsl.de [::ffff:78.53.44.196]) (AUTH: LOGIN jan, TLS: TLSv1/SSLv3,128bits,AES128-SHA) by jan.prima.de with esmtp; Wed, 16 Sep 2009 08:22:39 +0000 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Mime-Version: 1.0 (Apple Message framework v1076) Subject: Re: svn commit: r815404 - /couchdb/branches/0.10.x/etc/couchdb/default.ini.tpl.in From: Jan Lehnardt In-Reply-To: <20090916080511.GC11478@uk.tiscali.com> Date: Wed, 16 Sep 2009 10:22:07 +0200 Content-Transfer-Encoding: 7bit Message-Id: References: <20090916080511.GC11478@uk.tiscali.com> To: dev@couchdb.apache.org X-Mailer: Apple Mail (2.1076) X-Virus-Checked: Checked by ClamAV on apache.org On 16 Sep 2009, at 10:05, Brian Candler wrote: > On Tue, Sep 15, 2009 at 11:30:37AM -0700, Chris Anderson wrote: >> The basic tradeoff here is between safety and speed. With a simple >> benchmark on my Mac laptop (OSX 10.5) delayed_commits gives ~230 >> writes/second while we only get about 5/sec with the slow safe >> option. >> >> I think 5 writes/second is too slow to be useful, so it doesn't >> matter >> how safe it is. > > And aside from that: why is it only 5 writes per second? I understand > write -> sync -> write metadata -> sync, but any half-decent drive > should > still be able to do 100+ random writes per second. > > Would OSX be putting a sleep() in there somewhere?? Mac OS X docs encourage to use fcntl(F_FULLFSYNC) instead of a simple fsync()*. The fcntl() call forces the drive to flush buffers while fsync() just flushes the kernel buffer. The guarantee that data ends up on the disk as promised is higher using fcntl() on Mac OS X compared to fsync() on Linux. Cheers Jan -- * http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man2/fsync.2.html