X-Original-To: pgsql-performance@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id EC67A47659F for ; Sun, 2 Feb 2003 06:00:44 -0500 (EST) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id C791E47660F for ; Sun, 2 Feb 2003 05:40:56 -0500 (EST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id h12Adah03315; Sun, 2 Feb 2003 05:39:36 -0500 (EST) From: Bruce Momjian Message-Id: <200302021039.h12Adah03315@candle.pha.pa.us> Subject: Re: Postgres 7.3.1 poor insert/update/search performance In-Reply-To: To: Curt Sampson Date: Sun, 2 Feb 2003 05:39:36 -0500 (EST) Cc: Neil Conway , Andrew Sullivan , pgsql-performance@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/4 X-Sequence-Number: 1060 Curt Sampson wrote: > > > Some systems, like Solaris, allow you to turn off the > > > disk cache, so the problem may not be one you face.) > > > > I think it would be interesting to investigate disabling the OS' cache > > for all relation I/O (i.e. heap files, index files). That way we could > > both improve performance (by moving all the caching into PostgreSQL's > > domain, where there is more room for optimization)... > > I'm not so sure that there is that all much more room for optimization. > But take a look at what Solaris and FFS do now, and consider how much > work it would be to rewrite it, and then see if you even want to do that > before adding stuff to improve performance. We need free-behind for large sequential scans, like Solaris has. Do we have LRU-2 or LRU-K now? > > If so, is it portable? > > O_DIRECT is not all that portable, I don't think. Certainly not as > portable as mmap. As I remember, DIRECT doesn't return until the data hits the disk (because there is no OS cache), so if you want to write a page so you can reused the buffer, DIRECT would be quite slow. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073