Re: [PATCH 00/33] Adaptive read-ahead V12

Michael Stone
2006-05-25T19:26:28Z

On Thu, May 25, 2006 at 08:44:15AM -0700, Andrew Morton wrote:
>These are nice-looking numbers, but one wonders. If optimising readahead
>makes this much difference to postgresql performance then postgresql should
>be doing the readahead itself, rather than relying upon the kernel's
>ability to guess what the application will be doing in the future. Because
>surely the database can do a better job of that than the kernel.

In this particular case Wu had asked about postgres numbers, so I
reported some postgres numbers. You could probably get similar speedups
out of postgres by implementing readahead in postgres. OTOH, the kernel
patch also gives substantial speedups to thing like cp; the question
comes down to whether it's better for every application to implement
readahead or for the kernel to do it. (There are, of course, other
concerns like maintainability or whether performance degrades in other
cases, but I didn't test that. :)

Mike Stone