X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4F04852ECA for ; Thu, 11 Aug 2005 20:54:50 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 09410-10 for ; Thu, 11 Aug 2005 23:54:47 +0000 (GMT) Received: from vms044pub.verizon.net (vms044pub.verizon.net [206.46.252.44]) by svr1.postgresql.org (Postfix) with ESMTP id DACD352EC7 for ; Thu, 11 Aug 2005 20:54:41 -0300 (ADT) Received: from osgiliath.mathom.us ([70.108.53.154]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IL30088P1380PV1@vms044.mailsrvcs.net> for pgsql-performance@postgresql.org; Thu, 11 Aug 2005 18:54:45 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by osgiliath.mathom.us (Postfix) with ESMTP id 6861761C7F4 for ; Thu, 11 Aug 2005 19:54:44 -0400 (EDT) Received: from osgiliath.mathom.us ([127.0.0.1]) by localhost (osgiliath [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 27237-01-3 for ; Thu, 11 Aug 2005 19:54:44 -0400 (EDT) Received: by osgiliath.mathom.us (Postfix, from userid 1000) id 4C5346005C0; Thu, 11 Aug 2005 19:54:44 -0400 (EDT) Date: Thu, 11 Aug 2005 19:54:44 -0400 From: Michael Stone Subject: Re: PG8 Tuning In-reply-to: <1123780724.14573.108.camel@archimedes> To: pgsql-performance@postgresql.org Mail-Followup-To: pgsql-performance@postgresql.org Message-id: <20050811235444.GO19080@mathom.us> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-disposition: inline X-Pgp-Fingerprint: 53 FF 38 00 E7 DD 0A 9C 84 52 84 C5 EE DF 7C 88 X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at mathom.us References: <1536.217.45.209.171.1123763001.squirrel@www.gradwell.com> <1123836428.19976.26.camel@amd64-laptop-spoe> <1123780724.14573.108.camel@archimedes> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200508/138 X-Sequence-Number: 13885 On Thu, Aug 11, 2005 at 10:18:44AM -0700, Mark Lewis wrote: >Actually, it seems to me that with the addition of the WAL in PostgreSQL >and the subsequent decreased need to fsync the data files themselves >(only during checkpoints?), that the only time a battery-backed write >cache would make a really large performance difference would be on the >drive(s) hosting the WAL. Write cache on a raid array helps in the general case too, because it allows the controller to aggregate & reorder write requests. The OS probably tries to do this to some degree, but it can't do as well as the raid controller because it doesn't know the physical disk layout. >Hmmm, on second thought, now I think I understand the rationale behind >having a non-zero commit delay setting-- the problem with putting >pg_xlog on a single disk without a write cache is that frequent fsync() >calls might cause it to spend most of its time seeking instead of >writing (as seems to be happening to Paul here). Then again, the OS IO >scheduler should take care of this for you, making this a non-issue. The OS can't do anything much in terms of IO scheduling for synchronous writes. Either it handles them in suboptimal order or you get hideous latency while requests are queued for reordering. Neither option is really great. Mike Stone