RE: [PATCH] ide write barrier support

From: Mudama, Eric
Date: Thu Oct 16 2003 - 11:52:03 EST



On Tue, Oct 14 2003, Greg Stark wrote:
> Jens Axboe <axboe@xxxxxxx> writes:
> > There's also the case of files opened with O_SYNC. Would inserting a
> > write barrier after every write to such a file destroy performance?
>
> If it's mainly sequential io, then no it won't destroy performance. It
> will be lower than without the cache flush of course.

If you flush a cache after every command in a sequential write, yes, you'll
destroy performance. How much you destroy it is a function of command size
relative to track size, and the RPM of the drive.

It takes us multiple servo wedges to know that we think our write to the
media went in the right place, therefore by definition if we didn't already
have the next command's data, we've already missed our target location and
have to wait a full revolution to put the new data on the media. Since we
can't report good status for the flush until after we're sure the data is
down properly, we'll always blow a rev.

If you're issuing 32 MiB writes to a very fast drive , you'll only have
wasted time every 1/3 of a second (with a ~100MB interface)... which is near
trivial. However, if you're doing 1MB or smaller writes, I think you'll see
a huge performance penalty.

Then again, if you're only working with datasets of a few megabytes, you'd
probably never notice. It is the person flushing a huge stream of data to
disk who gets penalized the most.

--eric

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/