X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 19C059FB1B8 for ; Wed, 20 Sep 2006 16:36:03 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 09837-08 for ; Wed, 20 Sep 2006 16:35:53 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 45F479FA436 for ; Wed, 20 Sep 2006 16:35:53 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from elasmtp-banded.atl.sa.earthlink.net (elasmtp-banded.atl.sa.earthlink.net [209.86.89.70]) by svr4.postgresql.org (Postfix) with ESMTP id A5C385AF94A for ; Wed, 20 Sep 2006 19:35:51 +0000 (GMT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=ZD7w/7wn+TfSbCif48o8IpHsDIgOXWhq16BU2u3it+z2c7GldnbRH5v/YeXx/4hU; h=Received:Message-Id:X-Mailer:Date:To:From:Subject:Cc:In-Reply-To:References:Mime-Version:Content-Type:X-ELNK-Trace:X-Originating-IP; Received: from [71.243.1.211] (helo=rpeace101.earthlink.net) by elasmtp-banded.atl.sa.earthlink.net with asmtp (TLSv1:AES256-SHA:256) (Exim 4.34) id 1GQ7qt-0006ia-GG; Wed, 20 Sep 2006 15:35:23 -0400 Message-Id: <7.0.1.0.2.20060920153217.03d6be30@earthlink.net> X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Date: Wed, 20 Sep 2006 15:35:11 -0400 To: Markus Schaber From: Ron Subject: Re: Large tables (was: RAID 0 not as fast as Cc: pgsql-performance@postgresql.org In-Reply-To: <4511821E.2030902@logix-tt.com> References: <4511821E.2030902@logix-tt.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-ELNK-Trace: acd68a6551193be5d780f4a490ca69563f9fea00a6dd62bc7a712422a6835ffcb67782314eb43fa7350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 71.243.1.211 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.335 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200609/273 X-Sequence-Number: 20959 IMHO, AIO is the architecturally cleaner and more elegant solution. We in fact have a project on the boards to do this but funding (as yet) has not been found. My $.02, Ron At 02:02 PM 9/20/2006, Markus Schaber wrote: >Hi, Luke, > >Luke Lonergan wrote: > > >> Do you think that adding some posix_fadvise() calls to the backend to > >> pre-fetch some blocks into the OS cache asynchroneously could improve > >> that situation? > > > > Nope - this requires true multi-threading of the I/O, there need to be > > multiple seek operations running simultaneously. The current executor > > blocks on each page request, waiting for the I/O to happen before > requesting > > the next page. The OS can't predict what random page is to be requested > > next. > >I thought that posix_fadvise() with POSIX_FADV_WILLNEED was exactly >meant for this purpose? > >My idea was that the executor could posix_fadvise() the blocks it will >need in the near future, and later, when it actually issues the blocking >read, the block is there already. This could even give speedups in the >single-spindle case, as the I/O scheduler could already fetch the next >blocks while the executor processes the current one. > >But there must be some details in the executor that prevent this. > > > We can implement multiple scanners (already present in MPP), or we could > > implement AIO and fire off a number of simultaneous I/O requests for > > fulfillment. > >AIO is much more intrusive to implement, so I'd preferrably look >whether posix_fadvise() could improve the situation. > >Thanks, >Markus > >---------------------------(end of broadcast)--------------------------- >TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq