Re: VB5 forcing data to disk



As I understand it, Jim, changes have been made within the sub-systems, and
the driver I/O requests, to ensure that such data can be persisted safely.
I'm not sure whether these changes are actually new requests, or a
clarification of the semantics of the old requests. I believe that's partly
the cause of the confusion within Microsoft itself over what the correct
flag settings should be. After all, database integrity, and the possibility
of any successful recovery procedure after a powerfail, depend on having
guaranteed points of data consistency.

I mentioned that in my own experience I've found some wildly different
performance characteristics for FILE_FLAG_WRITE_THROUGH. Although I don't
have any concrete evidence, it all seems to smack of a change beneath the
covers.

Tony Proctor

"Jim Mack" <jmack@xxxxxxxxxxxxxxx> wrote in message
news:u$Zklp2$HHA.1184@xxxxxxxxxxxxxxxxxxxxxxx
Tony Proctor wrote:

For data integrity on disk, look for the FILE_FLAG_WRITE_THROUGH
flag. This ensures that all writes go "through" the cache and
safely on to disk.

Safely to the disk subsystem, yes, and from a programmer's POV that's
all you can do.

But modern disks and (especially RAID) controllers may cache writes
out of view of Windows or the file system, so flushing is no guarantee
against power loss, for example. There may be many megabytes of data
in HW cache when the plug gets pulled.

Such controllers usually offer a small battery backup option. It's
always smart to opt for it (-:

--
Jim



.



Relevant Pages

  • Re: Overlapped IO with error 0x800705AD
    ... In cached mode, cache manager would preload the data ahead of requested. ... could also get cached data without an access to an actual disk. ... The bad return of ReadFile and WriteFile was effectively due to the ... And I have best perfs by queueing more requests by thread (best ...
    (microsoft.public.win32.programmer.kernel)
  • Re: disk write barriers
    ... specially crafted i/o requests ... barrier request will be completed before any request that follows the ... reenable the cache on a barrier. ... the driver and/or the disk could reorder writes at will). ...
    (freebsd-questions)
  • Re: Zombie files
    ... or greater will give the WPS a chance to get its objects ... cache has to be flushed to hard disk. ... It has as the closemust write the buffer - at least into the disk ... the success of removing a file when the remove requests comes too ...
    (comp.os.os2.programmer.misc)
  • PROBLEM: sata_sil24 lockups under heavy i/o
    ... a total of 4) and started heavy i/o (extending a software raid5 device) ... system recovers the disk transfer speed is reduced from UDMA/100 to ... Cache Line Size: 32 bytes ... parport_pc: Current parallel port base: 0x378 ...
    (Linux-Kernel)
  • Re: Scheduler: Process priority fed back to parent?
    ... Mac OS X has a special cache ... on disk of things that get loaded on boot. ... >>initial priority is a guess, and isn't set until the priority info has ... This prefetch activity could be turned on/off ...
    (Linux-Kernel)