lkml.org 
[lkml]   [1999]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: fs/etx2/file.c question from postgres developers...
Hi,

On Mon, 1 Nov 1999 12:12:12 -0700, "Aaron J. Seigo" <aaron@gtv.ca> said:

> in response to a performance issue with disk i/o when using the
> postgresql database (maintained and developed mostly by bsd users,
> though used by many linux users) the following has come up...

> ____________________________________

>> Next question is what to do about it. I don't suppose we have any way
>> of turning off the OS' read-ahead algorithm :-(.

> Look what I found. I downloaded Linux kernel source for 2.2.0, and
> started looking for the word 'ahead' in the file system files. I found
> that read-ahead seems to be controlled by f_reada, and look where I
> found it being turned off? Seems like any seek turns off read-ahead on
> Linux.

It's a lot more complex than that --- check the do_generic_file_read()
code in mm/filemap.c for the full algorithm. The readahead "window" is
tuned dynamically based on sequential accesses, and any read outside the
window clears the readahead.

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.052 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site