Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 91E169FBA65 for ; Fri, 30 Mar 2007 10:14:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 63936-10 for ; Fri, 30 Mar 2007 10:14:31 -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 A1F0A9FB8E2 for ; Fri, 30 Mar 2007 10:14:36 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id a73so244315pye for ; Fri, 30 Mar 2007 06:14:35 -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:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=b+xITVjPU954Tpvcia7PMNxxqUTeM6Qv2momGDnr32GPxuSmosj6C+WnEgoDWUmSNOCKC+TrPbC8J5rl/NwRifohxfclKaMjzBwlRozkF5UuKPOqacJg9fkdSnfb2B73g2MujEFid9G/PcJtUk4l5tssC4NVui0IY2HHNQRwfMw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Td7jW7Seq93BjMoZAMvoIhxjUMV+XnNrDjACN6m5o+19ny0eD5sV7ch5v+pmQDUJEbPCOB5EdcdLzCBC6zJAnOOCTazqsWeiFGFNLHHn0tkJx0iv6+UFTyMrXmHydAtzVoka9mizWgtpe0/px3YEWjckMJRq3jftmTu2Y288Gsk= Received: by 10.35.106.1 with SMTP id i1mr3157557pym.1175260475389; Fri, 30 Mar 2007 06:14:35 -0700 (PDT) Received: by 10.35.110.1 with HTTP; Fri, 30 Mar 2007 06:14:35 -0700 (PDT) Message-ID: <5482c80a0703300614x1fe7d9ccy2d414ed87f98db3d@mail.gmail.com> Date: Fri, 30 Mar 2007 15:14:35 +0200 From: Dimitri To: "Erik Jones" Subject: Re: Shared buffers, db transactions commited, and write IO on Solaris Cc: "Tom Lane" , "PostgreSQL Performance" In-Reply-To: <84D24979-AF34-4875-9AFB-DD4A7814B99A@myemma.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> <23286.1175184996@sss.pgh.pa.us> <5482c80a0703291041gbf95cd9v95e17e271293ae8e@mail.gmail.com> <606E8491-AAFB-493E-8FFA-FF26D6DD5ACE@myemma.com> <5482c80a0703291515i7c05ba28l6f7240ebb5d2b837@mail.gmail.com> <84D24979-AF34-4875-9AFB-DD4A7814B99A@myemma.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/448 X-Sequence-Number: 23853 > > You are right in that the page size constraint is lifted in that > directio cuts out the VM filesystem cache. However, the Solaris > kernel still issues io ops in terms of its logical block size (which > we have at the default 8K). It can issue io ops for fragments as > small as 1/8th of the block size, but Postgres issues its io requests > in terms of the block size which means that io ops from Postgres will > be in 8K chunks which is exactly what we see when we look at our > system io stats. In fact, if any io request is made that isn't a > multiple of 512 bytes (the disk sector size), the file system > switches back to the buffered io. Oh, yes, of course! yes, you still need to respect multiple of 512 bytes block size on read and write - sorry, I was tired :) Then it's seems to be true - default XLOG block size is 8K, means for every even small auto-committed transaction we should write 8K?... Is there any reason to use so big default block size?... Probably it may be a good idea to put it as 'initdb' parameter? and have such value per database server? Rgds, -Dimitri > > > > > However, to understand TX number mystery I think the only possible > > solution > > is to reproduce a small live test: > > > > (I'm sure you're aware you can mount/unmount forcedirectio > > dynamically?) > > > > during stable workload do: > > > > # mount -o remount,logging /path_to_your_filesystem > > > > and check if I/O volume is increasing as well TX numbers > > than come back: > > > > # mount -o remount,forcedirectio /path_to_your_filesystem > > > > and see if I/O volume is decreasing as well TX numbers... > > That's an excellent idea and I'll run it by the rest of our team > tomorrow. > > erik jones > software developer > 615-296-0838 > emma(r) > > > >