X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 44449DBA49 for ; Wed, 23 Nov 2005 13:51:44 -0400 (AST) 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 49347-01 for ; Wed, 23 Nov 2005 17:51:42 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.Mi8.com (d01gw03.mi8.com [63.240.6.42]) by svr1.postgresql.org (Postfix) with ESMTP id 330A6DBA1E for ; Wed, 23 Nov 2005 13:51:40 -0400 (AST) Received: from 172.16.1.110 by mail.Mi8.com with ESMTP (- Welcome to Mi8 Corporation www.Mi8.com (D3)); Wed, 23 Nov 2005 12:51:32 -0500 X-Server-Uuid: E847189C-FC88-4913-9CD4-DE66914F83C0 Received: from MI8NYCMAIL06.Mi8.com ([172.16.1.175]) by D01SMTP01.Mi8.com with Microsoft SMTPSVC(6.0.3790.211); Wed, 23 Nov 2005 12:51:08 -0500 Received: from 208.54.15.129 ([208.54.15.129]) by MI8NYCMAIL06.Mi8.com ( [172.16.1.219]) via Exchange Front-End Server mi8owa.mi8.com ( [172.16.1.106]) with Microsoft Exchange Server HTTP-DAV ; Wed, 23 Nov 2005 12:51:08 -0500 User-Agent: Microsoft-Entourage/11.2.1.051004 Date: Wed, 23 Nov 2005 09:51:06 -0800 Subject: Re: Hardware/OS recommendations for large databases ( From: "Luke Lonergan" To: "Bruce Momjian" , "Greg Stark" cc: stange@rentec.com, "Dave Cramer" , "Joshua Marsh" , pgsql-performance@postgresql.org Message-ID: Thread-Topic: [PERFORM] Hardware/OS recommendations for large databases ( Thread-Index: AcXvwsL8LhmQH2wmSB604BAv4GFvlwAk7dXr In-Reply-To: <200511230013.jAN0DKV10698@candle.pha.pa.us> MIME-Version: 1.0 X-OriginalArrivalTime: 23 Nov 2005 17:51:08.0974 (UTC) FILETIME=[7C182CE0:01C5F056] X-WSS-ID: 6F9A73A819O1733739-18-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=2.386 required=5 tests=[AWL=-0.103, RCVD_IN_SORBS_WEB=1.236, RCVD_NUMERIC_HELO=1.253] X-Spam-Score: 2.386 X-Spam-Level: ** X-Archive-Number: 200511/470 X-Sequence-Number: 15727 Bruce, On 11/22/05 4:13 PM, "Bruce Momjian" wrote: > Perfect summary. We have a background writer now. Ideally we would > have a background reader, that reads-ahead blocks into the buffer cache. > The problem is that while there is a relatively long time between a > buffer being dirtied and the time it must be on disk (checkpoint time), > the read-ahead time is much shorter, requiring some kind of quick > "create a thread" approach that could easily bog us down as outlined > above. Yes, the question is "how much read-ahead buffer is needed to equate to the 38% of I/O wait time in the current executor profile?" The idea of asynchronous buffering would seem appropriate if the executor would use the 38% of time as useful work. A background reader is an interesting approach - it would require admin management of buffers where AIO would leave that in the kernel. The advantage over AIO would be more universal platform support I suppose? > Right now the file system will do read-ahead for a heap scan (but not an > index scan), but even then, there is time required to get that kernel > block into the PostgreSQL shared buffers, backing up Luke's observation > of heavy memcpy() usage. As evidenced by the 16MB readahead setting still resulting in only 36% IO wait. > So what are our options? mmap()? I have no idea. Seems larger page > size does help. Not sure about that, we used to run with 32KB page size and I didn't see a benefit on seq scan at all. I haven't seen tests in this thread that compare 8K to 32K. - Luke