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 9168A9FB3C4 for ; Fri, 22 Sep 2006 00:07:20 -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 39895-04 for ; Fri, 22 Sep 2006 03:06:20 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from momjian.us (momjian.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id DBC489FB38C for ; Fri, 22 Sep 2006 00:06:18 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id k8M35dI10346; Thu, 21 Sep 2006 23:05:39 -0400 (EDT) From: Bruce Momjian Message-Id: <200609220305.k8M35dI10346@momjian.us> Subject: Re: Large tables (was: RAID 0 not as fast as In-Reply-To: <20060922025209.GO6211@esphion.com> To: Guy Thornley Date: Thu, 21 Sep 2006 23:05:39 -0400 (EDT) CC: Markus Schaber , Luke Lonergan , pgsql-performance@postgresql.org X-Mailer: ELM [version 2.4ME+ PL123] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200609/292 X-Sequence-Number: 20978 Guy Thornley wrote: > > >> I thought that posix_fadvise() with POSIX_FADV_WILLNEED was exactly > > >> meant for this purpose? > > > > > > This is a good idea - I wasn't aware that this was possible. > > > > This possibility was the reason for me to propose it. :-) > > posix_fadvise() features in the TODO list already; I'm not sure if any work > on it has been done for pg8.2. > > Anyway, I understand that POSIX_FADV_DONTNEED on a linux 2.6 kernel allows > pages to be discarded from memory earlier than usual. This is useful, since > it means you can prevent your seqscan from nuking the OS cache. > > Of course you could argue the OS should be able to detect this, and prevent > it occuring anyway. I don't know anything about linux's behaviour in this > area. We tried posix_fadvise() during the 8.2 development cycle, but had problems as outlined in a comment in xlog.c: /* * posix_fadvise is problematic on many platforms: on older x86 Linux * it just dumps core, and there are reports of problems on PPC platforms * as well. The following is therefore disabled for the time being. * We could consider some kind of configure test to see if it's safe to * use, but since we lack hard evidence that there's any useful performance * gain to be had, spending time on that seems unprofitable for now. */ -- Bruce Momjian bruce@momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +