Re: Introducing a new linux readahead framework

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: Introducing a new linux readahead framework
Дата
Msg-id 20060421043147.GV49405@pervasive.com
обсуждение исходный текст
Ответ на Introducing a new linux readahead framework  (Wu Fengguang <wfg@mail.ustc.edu.cn>)
Ответы Re: Introducing a new linux readahead framework  (Wu Fengguang <wfg@mail.ustc.edu.cn>)
Список pgsql-performance
On Fri, Apr 21, 2006 at 09:38:26AM +0800, Wu Fengguang wrote:
> Greetings,
>
> I'd like to introduce a new readahead framework for the linux kernel:
> http://www.ussg.iu.edu/hypermail/linux/kernel/0603.2/1021.html
>
> HOW IT WORKS
>
> 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

Are there any ways to inform the kernel that you either are or aren't
doing a sequential read? It seems that in some cases it would be better
to bypass a bunch of tricky logic trying to determine that it's doing a
sequential read. A sequential scan in PostgreSQL would be such a case.

The opposite example would be an index scan of a highly uncorrelated
index, which would produce mostly random reads from the table. In that
case, reading ahead probably makes very little sense, though your logic
might have a better idea of the access pattern than PostgreSQL does.
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

В списке pgsql-performance по дате отправления:

Предыдущее
От: Wu Fengguang
Дата:
Сообщение: Introducing a new linux readahead framework
Следующее
От: "soni de"
Дата:
Сообщение: Re: Takes too long to fetch the data from database