Current swap-timeout code does not know about max-swap-rate. It
simply finds the longest-waiting I/O in disker queues (incoming and
outgoing) and then assumes that the new I/O will wait at least that
long. The assumption is likely to be wrong when the queue contains
lots of freshly queued requests to disker: Those requests have not
waited long yet, but a max-swap-rate limit will slow them down
shortly.
The patch changes the swap-timeout code to account for max-swap-rate
when dealing with the workers-to-disker queue: If there are N requests
pending, the new one will wait at least N/max-swap-rate seconds. Also
expected wait time is adjusted based on the queue "balance" member, in
case we have been borrowing time against future I/O already.
--- src/DiskIO/IpcIo/IpcIoFile.cc | 16 +++++++++++++++- src/ipc/Queue.cc | 30 ++++++++++++++++++++++++++++++ src/ipc/Queue.h | 28 ++++++++++++++++++++++------ 3 files changed, 67 insertions(+), 7 deletions(-)
This archive was generated by hypermail 2.2.0 : Fri Oct 14 2011 - 12:00:15 MDT