What is the default buffer size for CreateFile on Windows?
It depends on how much RAM you have and how the computer is configured. Servers are usually configured to have system cache privilege. You can change this by modifying the following registry key
[HKEY_LOCAL_MACHINE \System \CurrentControlSet \Control \Session Manager \Memory Management] LargeSystemCache
Function The SetSystemFileCacheSize function can be used to change the cache size. However, from what I understand, setting the working set size is more of an operating system hint than a hard limit.
As for your second question, I'm not really sure what you mean. I don't see how your buffer size will affect your throughput, but I'm sure someone will correct me if I'm wrong.
a source to share
If you are using non-buffering, there is actually no buffer for I / O other than the one you gave for read / write. (This is with the exception of the compressed files, which are another ball of wax.)
The system cache is ignored in this case, so you need to (see MSDN ) to be careful with the alignment and size of your IO.
a source to share