Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id D63AB1337B74 for ; Mon, 25 Oct 2010 16:26:43 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 20141-07 for ; Mon, 25 Oct 2010 19:26:36 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from zimbra01a.gobox.com.br (gobox.com.br [189.26.115.162]) by mail.postgresql.org (Postfix) with ESMTP id E51A21337B6D for ; Mon, 25 Oct 2010 16:26:35 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra01a.gobox.com.br (Postfix) with ESMTP id F051B14273782; Mon, 25 Oct 2010 17:26:31 -0200 (BRST) X-Virus-Scanned: amavisd-new at gobox.com.br Received: from zimbra01a.gobox.com.br ([127.0.0.1]) by localhost (zimbra01a.gobox.com.br [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g4+yd-OcMrff; Mon, 25 Oct 2010 17:26:29 -0200 (BRST) Received: from zimbra01a.gobox.com.br (zimbra01a.gobox.com.br [172.16.10.22]) by zimbra01a.gobox.com.br (Postfix) with ESMTP id AC8B61427376E; Mon, 25 Oct 2010 17:26:29 -0200 (BRST) Date: Mon, 25 Oct 2010 17:26:29 -0200 (BRST) From: =?utf-8?Q?Andr=C3=A9_Volpato?= To: Merlin Moncure Cc: PGSQL-Performance Message-ID: <789252381.9649.1288034789616.JavaMail.root@zimbra01a> In-Reply-To: Subject: Re: AIX slow buffer reads MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [172.16.10.1] X-Mailer: Zimbra 6.0.8_GA_2661 (ZimbraWebClient - FF3.0 (Win)/6.0.8_GA_2661) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201010/410 X-Sequence-Number: 40828 | On Mon, Oct 25, 2010 at 2:21 PM, Andr=C3=A9 Volpato | wrote: | > Hi all, | > | > We are tuning a PostgreSQL box with AIX 5.3 and got stucked in a | > very odd situation. | > When a query got ran for the second time, the system seems to | > deliver the results to slow. | > | > Here=C2=B4s some background info: | > | > AIX Box: | > PostgreSQL 8.4.4, AIX 5.3-9 64bits, SAN IBM DS3400, 8x450GB SAS 15K | > Raid-5 | > 8GB RAM, 2.3GB Shared buffers | > | > Debian Box: | > PostgreSQL 8.4.4, Debian 4.3.2 64bits, SAN IBM DS3400, 5x300GB SAS | > 15K Raid-0 | > 7GB RAM, 2.1GB Shared buffers | > | > Right now, we changed lots of AIX tunables to increase disk and SO | > performance. | > Of course, postgres got tunned as well. I can post all changes made | > until now if needed. | > | > To keep it simple, I will try to explain only the buffer read issue. | > This query [1] took like 14s to run at AIX, and almost the same time | > at Debian. | > The issue is when I run it for the second time: | > AIX - 8s | > Debian - 0.3s | > | > These times keep repeating after the second run, and I can ensure | > AIX isn=C2=B4t touching the disks anymore. | > I=C2=B4ve never seen this behaviour before. I heard about Direct I/O an= d | > I was thinking about givng it a shot. | > Any ideas? | > |=20 | I doubt disk/io is the problem. =20 Me either. Like I said, AIX do not touch the storage when runing the query. It became CPU-bound after data got into cache. | *) Are the plans *exactly* the same? The plan I sent refers to the AIX box: http://explain.depesz.com/s/5oz At Debian, the plan looks pretty much the same. | *) Are you running explain analyze? There are some platform specific | interactions caused by timing. Yes. I=C2=B4m not concerned about timing because the difference (8s against= 0.3s) is huge. | *) Are you transferring the data across the network? rule out | (horribly difficult to diagnose/fix) network effects. Not likely... Both boxes are in the same Bladecenter, using the same storag= e. |=20 | merlin []=C2=B4s, Andre Volpato