Fwd: Re: fs/etx2/file.c question from postgres developers...

From: "Aaron J(dot) Seigo" <aaron(at)gtv(dot)ca>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Fwd: Re: fs/etx2/file.c question from postgres developers...
Date: 1999-11-02 18:47:34
Message-ID: 99110211490602.28375@stilborne
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi...

as per the question of linux getting in the way of reads/writes, i forwarded
bruce's (?) message re: the ext2 code in the linux kernel... this is what i got
back.. hope this helps....

---------- Forwarded Message ----------
Subject: Re: fs/etx2/file.c question from postgres developers...
Date: Tue, 2 Nov 1999 14:40:51 +0000 (GMT)
From: "Stephen C. Tweedie" <sct(at)redhat(dot)com>

Hi,

On Mon, 1 Nov 1999 12:12:12 -0700, "Aaron J. Seigo" <aaron(at)gtv(dot)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
-------------------------------------------------------

--
Aaron J. Seigo
Sys Admin

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 1999-11-02 18:48:41 Re: [HACKERS] Get OID of just inserted record
Previous Message Bruce Momjian 1999-11-02 18:35:22 Re: [HACKERS] file descriptors leak?