Re: Introducing a new linux readahead framework

From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: Wu Fengguang <wfg(at)mail(dot)ustc(dot)edu(dot)cn>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Introducing a new linux readahead framework
Date: 2006-04-21 07:53:34
Message-ID: 44488F7E.6060704@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jan Dittmer 2006-04-21 08:37:10 Better way to write aggregates?
Previous Message Wu Fengguang 2006-04-21 07:15:11 Re: Introducing a new linux readahead framework