Re: Introducing a new linux readahead framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux