:
:Consider that a file with a huge number of pages outstanding
:should probably be stealing pages from its own LRU list, and
:not the system, to satisfy new requests. This is particularly
:true of files that are demanding resources on a resource-bound
:system.
:...
: Terry Lambert
: [EMAIL PROTECTED]
This isn't exactly what I was talking about. The issue in regards to
the filesystem syncer is that it fsync()'s an entire file. If
you have a big file (e.g. a USENET news history file) the
filesystem syncer can come along and exclusively lock it for
*seconds* while it is fsync()ing it, stalling all activity on
the file every 30 seconds.
The current VM system already does a good job in allowing files
to stealing pages from themselves. The sequential I/O detection
heuristic depresses the priority of pages as they are read making
it more likely for them to be reused. Since sequential I/O tends
to be the biggest abuser of file cache, the current FreeBSD
algorithms work well in real-life situations. We also have a few
other optimizations to reuse pages in there that I had added a year
or so ago (or fixed up, in the case of the sequential detection
heuristic).
One of the reasons why Yahoo uses MAP_NOSYNC so much (causing the problem
that Alfred has been talking about) is because the filesystem
syncer is 'broken' in regards to generating unnecessarily long stalls.
Personally speaking, I would much rather use MAP_NOSYNC anyway, even with
a fixed filesystem syncer. MAP_NOSYNC pages are not restricted by
the size of the filesystem buffer cache, so you can have a whole
lot more dirty pages in the system then you would normally be able to
have. This 'feature' has had the unfortunate side effect of screwing
up the pageout daemon's algorithms, but that's fixable.
-Matt
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message