On Tuesday November 28, [EMAIL PROTECTED] wrote:
> On Tue, Nov 28, 2000 at 10:50:06AM +1100, Neil Brown wrote:
> >    However, there is only one "unplug-all-devices"(*) call in the API
> >    that a reader or write can make.  It is not possible to unplug a
> >    particular device, or better still, to unplug a particular request.
> 
> This isn't totally true. When we run out of requests on a certain
> device and we must startup the I/O to release some of them, we unplug
> only the _single_ device and we don't unplug-all-devices anymore.
> 
> So during writes to disk (without using O_SYNC that isn't supported
> by 2.4.0-test11 anyways :) you never unplug-all-devices, but you only
> unplug finegrined at the harddisk level.

Thanks for these comments.  They helped think more clearly about what
was going on, and as a result I have raid5 working even faster still,
though not quite as fast as I hope...

The raid5 device has a "stripe cache" where the stripes play a similar
role to the requests used in the elevator code (__make_request).
i.e. they gather together buffer_heads for requests that are most
efficiently processed at the same time.

When I run out of stripes, I need to wait for one to become free, but
first I need to unplug any underlying devices to make sure that
something *will* become free soon.  When I unplug those devices, I
have to call "run_task_queue(&tq_disk)" (because that is the only
interface), and this unplugs the raid5 device too.  This substantially
reduces the effectiveness of the plugging that I had implemented.

To get around this artifact that I unplug whenever I need a stripe, I
changed the "get-free-stripe" code so that if it has to wait for a
stripe, it waits for 16 stripes.  This means that we should be able to
get up to 16 stripes all plugged together.

This has helped a lot and I am now getting dbench thoughputs on 4K and
8K chunk sizes (still waiting for the rest of the results) that are
better than 2.2 ever gave me.
It still isn't as good as I hoped:
With 4K chunks the 3drive thoughput it significantly better than the
2drive throughput.  With 8K it is now slightly less (instead of much
less).  But in 2.2, 3drives with 8K chunks is better than 2drives with
8K chunks.

What I really want to be able to do when I need a stripe but don't
have a free one is:

   1/ unplug any underlying devices
   2/ if >50% of my stripes are plugged, unplug this device.

(or some mild variation of that).  However with the current interface,
I cannot.

Still, I suspect I can squeeze a bit more out with the current
interface, and it will be enough for 2.4.  It will be fun working to
make the interfaces just right for 2.5....

NeilBrown

> 
> That isn't true for reads of course, for reads it's the highlevel FS/VM layer
> that unplugs the queue and it only knows about the run_task_queue(&tq_disk) but
> Jens has patches to fix it too :).

I'll have to have a look... but not today.

> 
> Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]

Reply via email to