X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id 4CC3711F8C58 for ; Fri, 21 Apr 2006 04:53:25 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: -2.202 X-Spam-Level: X-Spam-Status: No, score=-2.202 required=5 tests=[AWL=0.262, BAYES_00=-2.599, FORGED_RCVD_HELO=0.135] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id PGhUKOPLHu8W for ; Fri, 21 Apr 2006 04:53:22 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (unknown [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id E012211F6559 for ; Fri, 21 Apr 2006 04:53:20 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (T8eeb.t.pppool.de [89.55.142.235]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id 6659D656CB; Fri, 21 Apr 2006 09:54:20 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id 9BBE8181C1F57; Fri, 21 Apr 2006 09:53:34 +0200 (CEST) Message-ID: <44488F7E.6060704@logix-tt.com> Date: Fri, 21 Apr 2006 09:53:34 +0200 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Wu Fengguang Cc: pgsql-performance@postgresql.org Subject: Re: Introducing a new linux readahead framework References: <20060421013826.GA5217@mail.ustc.edu.cn> <20060421043147.GV49405@pervasive.com> <20060421071511.GA4885@mail.ustc.edu.cn> In-Reply-To: <20060421071511.GA4885@mail.ustc.edu.cn> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archive-Number: 200604/493 X-Sequence-Number: 18577 Hi, Wu, Wu Fengguang wrote: >>>In adaptive readahead, the context based method may be of particular >>>interest to postgresql users. It works by peeking into the file cache >>>and check if there are any history pages present or accessed. In this >>>way it can detect almost all forms of sequential / semi-sequential read >>>patterns, e.g. >>> - parallel / interleaved sequential scans on one file >>> - sequential reads across file open/close >>> - mixed sequential / random accesses >>> - sparse / skimming sequential read >>> >>>It also have methods to detect some less common cases: >>> - reading backward >>> - seeking all over reading N pages Gread news, thanks! > This call will disable readahead totally for fd: > posix_fadvise(fd, any, any, POSIX_FADV_RANDOM); > > This one will reenable it: > posix_fadvise(fd, any, any, POSIX_FADV_NORMAL); > > This one will enable readahead _and_ set max readahead window to > 2*max_readahead_kb: > posix_fadvise(fd, any, any, POSIX_FADV_SEQUENTIAL); I think that this is an easy, understandable and useful interpretation of posix_fadvise() hints. Are there any rough estimates when this will get into mainline kernel (if you intend to submit)? Thanks, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org