View Single Post
  #3  
Old February 10th 10, 11:50 AM posted to comp.arch.storage
Maxim S. Shatskih[_2_]
external usenet poster
 
Posts: 36
Default Disk optimization for multithreaded app.

If I recall correctly, NT and its descendants (unlike Unix) flush dirty
data to disk when a file is closed and report any error then.


No.

Nothing occurs when the file is closed. Flushes go after this by the lazy writer. Just copy a huge file in a Windows shell and look at flushing activity after the copy is reported done.

Preallocate any output file to its final size to avoid the overhead of
multiple intermediate allocations (and to maximize the probability that
it will be laid out contiguously on disk). I think you used to need to
use the Ntxxx native system calls


This will spend lots of time zeroing the newly allocated file. Not a way to make things faster.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com