X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 4B2699FB3DC for ; Fri, 22 Sep 2006 00:47:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 13482-07 for ; Fri, 22 Sep 2006 03:47:14 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.Mi8.com (d01gw01.mi8.com [63.240.6.47]) by postgresql.org (Postfix) with ESMTP id B976D9FB3CE for ; Fri, 22 Sep 2006 00:47:12 -0300 (ADT) Received: from 172.16.1.148 by mail.Mi8.com with ESMTP (- Welcome to Mi8 Corporation www.Mi8.com (D1)); Thu, 21 Sep 2006 23:47:04 -0400 X-Server-Uuid: 241911D6-425B-44B9-A073-E3FE0F8FC774 Received: from MI8NYCMAIL06.Mi8.com ([172.16.1.175]) by D01SMTP05.Mi8.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 21 Sep 2006 23:46:44 -0400 Received: from 12.10.172.241 ([12.10.172.241]) by MI8NYCMAIL06.Mi8.com ( [172.16.1.219]) via Exchange Front-End Server mi8owa.mi8.com ( [172.16.1.118]) with Microsoft Exchange Server HTTP-DAV ; Fri, 22 Sep 2006 03:46:43 +0000 User-Agent: Microsoft-Entourage/11.2.5.060620 Date: Thu, 21 Sep 2006 20:46:41 -0700 Subject: Re: Large tables (was: RAID 0 not as fast as From: "Luke Lonergan" To: mark@mark.mielke.cc, "Guy Thornley" cc: "Markus Schaber" , pgsql-performance@postgresql.org Message-ID: Thread-Topic: [PERFORM] Large tables (was: RAID 0 not as fast as Thread-Index: Acbd+bbL9XY0c0nsEduGXQAWy4o9DA== In-Reply-To: <20060922034037.GB2820@mark.mielke.cc> MIME-Version: 1.0 X-OriginalArrivalTime: 22 Sep 2006 03:46:44.0233 (UTC) FILETIME=[B8B87790:01C6DDF9] X-WSS-ID: 690D833239G1798648-02-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200609/294 X-Sequence-Number: 20980 Mark, On 9/21/06 8:40 PM, "mark@mark.mielke.cc" wrote: > I'd advise against using this call unless it can be shown that the page > will not be used in the future, or at least, that the page is less useful > than all other pages currently in memory. This is what the call really means. > It means, "There is no value to keeping this page in memory". Yes, it's a bit subtle. I think the topic is similar to "cache bypass", used in cache capable vector processors (Cray, Convex, Multiflow, etc) in the 90's. When you are scanning through something larger than the cache, it should be marked "non-cacheable" and bypass caching altogether. This avoids a copy, and keeps the cache available for things that can benefit from it. WRT the PG buffer cache, the rule would have to be: "if the heap scan is going to be larger than "effective_cache_size", then issue the posix_fadvise(BLOCK_NOT_NEEDED) call". It doesn't sound very efficient to do this in block/extent increments though, and it would possibly mess with subsets of the block space that would be re-used for other queries. - Luke