Sunday, November 21, 2010

Points need to take care during Asynchronous Write operation

Tip - While implementing asynchronous IO operations for performance tuning, we need to take care certain points.
Details -
Ø  We will get the write operation status in its associated callback function. In that call back function, we should check the operation status and number of bites written etc. Because the operation completion status is returned in the callback function only.
Ø  Make sure that write operation is completed before perform the following operations
o   Releasing buffer used for write operation
o   Closing the file handle
[Note: We will get execution control before finishing asynchronous IO operations]
Ø  Maximum buffer we can write using WriteFileEx is 64 MB(For X64 systems, the maximum buffer size is just under 32MB). So if we need to write more than the size limit, We need to make write operation in chunk or we need to write buffer before grow the file size up to required size.
Ø  For effective working of asynchronous IO operation, an alert able wait function should be invoked after asynchronous IO operation. Otherwise it will work just like synchronous IO operation.

Reference :



Posted By :Arun M. S.

No comments:

Post a Comment