Subject: Re: I/O priorities
To: Olaf Seibert <rhialto@polderland.nl>
From: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
List: tech-kern
Date: 07/12/2002 18:46:49
On Fri, Jul 12, 2002 at 03:28:32PM +0200, Olaf Seibert wrote:
> A friend of mine reminded me of another simple queueing algorithm for
> promoting fairness. I forgot the name, but it works with 2 queues: the
> active and the inactive queue. Once the active queue starts to be
> processed, any new requests that come in are put on the inactive one.
> Once the whole queue is processed, active and inactive are swapped.
> The new queue would be processed from the other direction, like the
> elevator. Maybe this is not even necessary.
> 
> While the elevator algorithm bounds the time that a request may stay in
> the queue to about (disk size) / (transfer speed), this algorithm bounds
> that time to (buffer memory size) / (transfer speed), which is typically
> several orders of magnitude lower.
> 
> Did anyone try already if this helps sufficiently?
> -Olaf.
> -- 
> ___ Olaf 'Rhialto' Seibert - rhialto@       -- Woe betide the one who feels
> \X/ polderland.nl  -- remorse without sin - Tom Poes, "Het boze oog", 4444.

I get very good results with read priority like:

	XXstrategy inserts the buf in one of two fifo's.
		One for read's and one for write's.
	
	XXstart gets the next buf as follows:
		It maintains a small group that gets filled with an
		equal amount of buf's from both fifo's.
		
		It tries ~250 buf's from the write fifo and uses
		the best subset.

		The size of this group is always readjusted, so that
		~20 groups are processed per second.
	
	Now read requests will be serviced with very little latency and
	the system becomes more responsive while maintaining nearly the
	same performance like the current disksort approach.

-- 
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (Germany)