qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Ensuring data is written to disk


From: Armistead, Jason
Subject: [Qemu-devel] Ensuring data is written to disk
Date: Mon, 31 Jul 2006 20:11:45 -0400

I've been following the thread about disk data consistency with some
interest.  Given that many IDE disk drives may choose to hold data in their
write buffers before actually writing it to disk, and given that the
ordering of the writes may not be the same as the OS or application expects,
the only obvious way I can see to overcome this, and ensure the data is
truly written to the physical platters without disabling write caching is to
overwhelm the disk drive with more data than can fit in its internal write
buffer.

So, if you have an IDE disk with an 8Mb cache, guess what, send it an 8Mb
chunk of random data to write out when you do an fsync().  Better still,
locate this 8Mb as close to the middle of the travel of its heads, so that
performance is not affected any more than necessary.  If the drive firmware
uses a LILO or LRU policy to determine when to do its disk writes,
overwhelming its buffers should ensure that the actual data you sent to it
gets written out 

Of course, guessing the disk drive write buffer size and trying not to kill
system I/O performance with all these writes is another question entirely
... sigh !!!


Jason






reply via email to

[Prev in Thread] Current Thread [Next in Thread]