Re: Overlapped IO with error 0x800705AD



In cached mode, cache manager would preload the data ahead of requested. You
could also get cached data without an access to an actual disk.

Uncached access is better used when you either read large files serially (in
this case the Windows cache manages sucks big time, tending to bloat the
cache at a cost of applications), or you implement your own caching scheme,
better suited for your access pattern.

"Marc Mirti Mancinelli" <MarcMirtiMancinelli@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote in message news:0936AD4D-61AB-43BC-9293-8FC713C7F270@xxxxxxxxxxxxxxxx
Thanks for your response.

The bad return of ReadFile and WriteFile was effectively due to the
missing
event. And I have best perfs by queueing more requests by thread (best
result
actually 8/6 io requests per thread, with 3 threads, approx. 15% better
than
1 thread with io sync).
But on lot of papers about async io it is written that to have maximum
perfs
with asynchronous io, it will be better to disable caching
(FILE_FLAG_NO_BUFFERING). And none of the tests I have done, show that,
and I
have all done to disavantage caching, by using big files (20go), and by
checking that tests never read/write sames offsets... Tests with no
buffering are 2 to 3 times smaller than with.
I don't understand why, and I can't figure how cache works to have these
results with these type of tests ?

"Alexander Grigoriev" wrote:

You should not issue large numbers of pending requests to a file. It
won't
do you any good, anyway. Use an event on OVERLAPPED, and wait for the
requests to complete.

With a cached file (no FILE_FLAG_OVERLAPPED), the requests get handed to
a
limited number of cache manager threads, where they are executed
_synchronously_. If there are too many requests, your request may by
actually performed _synchronously_ in the context of your thread. Make
sure
to check what ReadFile returns. If it returns TRUE, you should NOT wait
on
the event.

"marc mm" <marc mm@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6E196919-340C-4AB1-B50F-97D7B5CF3616@xxxxxxxxxxxxxxxx
I have written a program (in c++) to test IO operations and their perf
to
optimize a storage file format.
Prg behaviour: 2 threads do random read and write of 4Kbytes data at
offset
multiple of 4Kb on same file (20GBytes).

- When the test prg use overlapped IO(CreateFile with
FILE_FLAG_OVERLAPPED),
after a random time, the 2 threads are blocked on GetOverlappedResult,
sometimes after 1-5 minutes, they continue, and other times, they stop
with
error 0x800705AD (Insufficient quota space).
- When I use an event for OVERLAPPED struct, It seems that I haven't
the
problem, but performances are very smaller than without.
- When I use in CreateFile flags, FILE_FLAG_NO_BUFFERING, same case
than
with event set, performances are very smaller. Performances are poor
with
this flag in synchronous mode too...
- Frequently ReadFile and WriteFile in overlapped mode, return true (op
done), but with a data length performed at 0. I handled this case, by
retrying call to GetOverlappedResult, to wait a valid data length...
(and
it
works or it seems to work, problem doesn't appear after this case).

So I don't understand ;) :
- why I have error 0x800705AD in overlapped mode ? Error occurs only
when
2
threads at least do overlapped IO at same time, no problem with 1
thread.
With more than 2 threads, problem appears more quickly.
- why during overlapped IO, threads are blocked randomly for a so long
time
? (after sometimes 30% or 90%, ... test completed)
- why FILE_FLAG_NO_BUFFERING doesnt speed IO with 4Kbytes blocks read
or
written at offset multiple of 4K on a disk with 512 bytes sectors, and
4Kb
clusters?
- and why sometimes, ReadFile and WriteFile can return true, with no
data
read or written.

My actual tests are donne on vista 64, c++ 64bits(vc8), on an IDE disk.
But
I have the same problem(error 0x800705AD) on an XP 32bits computer with
a
sata disk (for perfs on this computer I must retry).

Thanks by advance for help, and sorry for my poor english.





.



Relevant Pages

  • 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: VB5 forcing data to disk
    ... the driver I/O requests, to ensure that such data can be persisted safely. ... For data integrity on disk, ... But modern disks and controllers may cache writes ... out of view of Windows or the file system, so flushing is no guarantee ...
    (microsoft.public.vb.general.discussion)
  • 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)
  • Re: Overlapped IO with error 0x800705AD
    ... You should not issue large numbers of pending requests to a file. ... but performances are very smaller than without. ... Frequently ReadFile and WriteFile in overlapped mode, ... My actual tests are donne on vista 64, c++ 64bits, on an IDE disk. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Caching control
    ... |> | invalidate/unmap them in order to discard the data from memory. ... |> writing out to disk. ... | easy to discard as clean disk cache. ... stating that a specific amount of RAM can be used only for I/O ...
    (comp.os.linux.development.system)