Forgot to attach the benchmark:
#include
#include
BYTE stuff_to_write[4096];
int N = 20; // simulate # of writes per transaction
void test1()
{
HANDLE h = CreateFile("C:\\temp1.txt", GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_FLAG_WRITE_THROUGH, NULL);
DWORD written;
DWORD d = GetTickCount()
Christian Smith wrote:
> No, because *every single* write to that handle will involve a sync to the
> underlying device! That would decimate performance.
> Using a single FlushFileBuffers batches multiple write's in a single sync
> operation.
> That this hurts performance on Windows says more abo
On Wed, 18 May 2005, Ludvig Strigeus wrote:
>Link:
>http://searchstorage.techtarget.com/tip/1,289483,sid5_gci920473,00.html
>
>Quote: "FlushFileBuffers is an API call that forces all data for an open
>file handle to be flushed from the system cache and also sends a command to
>the disk to flush it
Link:
http://searchstorage.techtarget.com/tip/1,289483,sid5_gci920473,00.html
Quote: "FlushFileBuffers is an API call that forces all data for an open
file handle to be flushed from the system cache and also sends a command to
the disk to flush its cache (contrary to the name, this call affects
4 matches
Mail list logo