Before the change, IpcIoFile::WaitBeforePop() delayed both swap ins
(hits) and swap outs (misses). This is suboptimal because reads do
not usually accumulate unfinished I/O requests in OS buffers and,
hence, do not eventually require the OS to block all I/O.
Ideally, a disker should probably dequeue all pending disker requests,
satisfy reads ASAP, and then handle writes, but that is difficult for
several reasons. The patch implements a simpler approach: peek the
next request to be popped, and if it is a swap in (i.e., read or hit),
then pop it without any delay.
When a read is popped, we still adjust the balance member and LastIo,
because we do want to maintain the configured average I/O rate. When a
write request comes in, it will be delayed [longer] if needed.
In the extreme case of a very long stream of read requests (no writes
at all), there will be essentially no I/O rate limit and that is what
we want.
--- src/DiskIO/IpcIo/IpcIoFile.cc | 13 ++++++++----- src/cf.data.pre | 8 ++++++-- src/ipc/Queue.cc | 15 --------------- src/ipc/Queue.h | 24 ++++++++++++++++++++++-- 4 files changed, 36 insertions(+), 24 deletions(-)
This archive was generated by hypermail 2.2.0 : Fri Oct 28 2011 - 12:00:11 MDT