From: Markus Schaber <schabi@logix-tt.com>
To: Wu Fengguang <wfg@mail.ustc.edu.cn>
Cc: pgsql-performance@postgresql.org
Subject: Re: Introducing a new linux readahead framework
Date: Fri, 21 Apr 2006 09:53:34 +0200
Message-ID: <44488F7E.6060704@logix-tt.com> (raw)
In-Reply-To: <20060421071511.GA4885@mail.ustc.edu.cn>
References: <20060421013826.GA5217@mail.ustc.edu.cn>
<20060421043147.GV49405@pervasive.com>
<20060421071511.GA4885@mail.ustc.edu.cn>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: schabi@logix-tt.com, wfg@mail.ustc.edu.cn
Subject: Re: Introducing a new linux readahead framework
In-Reply-To: <44488F7E.6060704@logix-tt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox