Messages in this thread | | | From | "Stephen C. Tweedie" <> | Date | Tue, 2 Nov 1999 14:40:51 +0000 (GMT) | Subject | Re: 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/
| |