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 697669FB205 for ; Wed, 20 Sep 2006 15:02:26 -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 99187-07 for ; Wed, 20 Sep 2006 15:02:11 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.tacotec.de (mail.tacotec.de [83.137.101.41]) by postgresql.org (Postfix) with ESMTP id 5266E9FB1F2 for ; Wed, 20 Sep 2006 15:02:11 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mail.tacotec.de (Postfix) with ESMTP id D17F011D571 for ; Wed, 20 Sep 2006 20:02:07 +0200 (CEST) Received: from mail.tacotec.de ([83.137.101.41]) by localhost (hera.tacotec.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11596-03 for ; Wed, 20 Sep 2006 20:02:07 +0200 (CEST) Received: from lunix.schabi.de (p549D21F8.dip0.t-ipconnect.de [84.157.33.248]) by mail.tacotec.de (Postfix) with ESMTP id A132D11D4EF for ; Wed, 20 Sep 2006 20:02:07 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by lunix.schabi.de (Postfix) with ESMTP id 7394B1B23ED for ; Wed, 20 Sep 2006 20:02:07 +0200 (CEST) Message-ID: <4511821E.2030902@logix-tt.com> Date: Wed, 20 Sep 2006 20:02:06 +0200 From: Markus Schaber User-Agent: Thunderbird 1.5.0.5 (X11/20060812) MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Large tables (was: RAID 0 not as fast as References: In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mail.tacotec.de X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.169 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO, SPF_HELO_PASS X-Spam-Level: X-Archive-Number: 200609/272 X-Sequence-Number: 20958 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