Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id AD86E9FA47A for ; Tue, 3 Apr 2007 13:52:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 32371-02-7 for ; Tue, 3 Apr 2007 13:51:56 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by postgresql.org (Postfix) with ESMTP id 1DF759FB79C for ; Tue, 3 Apr 2007 13:51:56 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id a73so683769pye for ; Tue, 03 Apr 2007 09:51:56 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Yalutp4j370xQX6ND3w/+L15wa/ayBvJr0uADJtn1TFG+s1y2S00tKSTsPADKX7i9AI/MYTq6MD+BvY2dHAAOyg3XjWcJiUP3tP5bsLC3rr+ZAP6u1/DZ9Ubx5xS4qUafPZiS38jU0++ARGUv7K2dtjf+2Mdkgwo7I87bggIGfI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FD5DyAzts3WTSLB0OUAx9p/LwuxSIPGTbfWxoVu4fhrPxVmqeCdRpqWl1wchDOKR3EJTmrLNiml6jF7BV24mbuRGPbmUesL7kk7qgzbHzcjc2+y54zFjTYw/rN4H2MS1QYtmWUDevZV1oJx/1d2ibtioIRFP+Tm42YVTX0/cwXY= Received: by 10.35.60.16 with SMTP id n16mr11570560pyk.1175619116436; Tue, 03 Apr 2007 09:51:56 -0700 (PDT) Received: by 10.35.110.1 with HTTP; Tue, 3 Apr 2007 09:51:56 -0700 (PDT) Message-ID: <5482c80a0704030951l342a28aw3e1ccc19196c2cae@mail.gmail.com> Date: Tue, 3 Apr 2007 18:51:56 +0200 From: Dimitri To: pgsql-performance@postgresql.org Subject: Re: Shared buffers, db transactions commited, and write IO on Solaris In-Reply-To: <5482c80a0703300858n64721e90y7295e9a25bcd1c5b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <9B7F4B34-7E96-4501-BCE0-D0BED739530A@myemma.com> <5482c80a0703291041gbf95cd9v95e17e271293ae8e@mail.gmail.com> <606E8491-AAFB-493E-8FFA-FF26D6DD5ACE@myemma.com> <5482c80a0703291515i7c05ba28l6f7240ebb5d2b837@mail.gmail.com> <84D24979-AF34-4875-9AFB-DD4A7814B99A@myemma.com> <5482c80a0703300614x1fe7d9ccy2d414ed87f98db3d@mail.gmail.com> <5482c80a0703300725o31562938x6e8e67bfa7f32fa7@mail.gmail.com> <20070330150506.GF11581@it.is.rice.edu> <5482c80a0703300858n64721e90y7295e9a25bcd1c5b@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/20 X-Sequence-Number: 23897 Folks, to close topic with "LOG block size=1K" idea - I took a time to test it (yes) and in best cases there is only 15% gain comparing to 8K - storage protocol is quite heavy itself, so less or more data sent within it doesn't reduce service time too much... As well even this gain is quickly decreasing with growing workload! So, yes 8K is good enough and probably the most optimal choice for LOG (as well data) block size. Rgds, -Dimitri > Well, to check if there is a real potential gain all we need is a > small comparing test using PgSQL compiled with LOG block size equal to > say 1K and direct IO enabled. > > Rgds, > -Dimitri > > > On 3/30/07, Kenneth Marshall wrote: > > On Fri, Mar 30, 2007 at 04:25:16PM +0200, Dimitri wrote: > > > The problem is while your goal is to commit as fast as possible - it's > > > pity to vast I/O operation speed just keeping common block size... > > > Let's say if your transaction modification entering into 512K - you'll > > > be able to write much more 512K blocks per second rather 8K per second > > > (for the same amount of data)... Even we rewrite probably several > > > times the same block with incoming transactions - it still costs on > > > traffic, and we will process slower even H/W can do better. Don't > > > think it's good, no? ;) > > > > > > Rgds, > > > -Dimitri > > > > > With block sizes you are always trading off overhead versus space > > efficiency. Most OS write only in 4k/8k to the underlying hardware > > regardless of the size of the write you issue. Issuing 16 512byte > > writes has much more overhead than 1 8k write. On the light transaction > > end, there is no real benefit to a small write and it will slow > > performance for high throughput environments. It would be better to, > > and I think that someone is looking into, batching I/O. > > > > Ken > > >