From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org, "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> |
Subject: | Re: win32 performance - fsync question |
Date: | 2005-02-17 18:32:56 |
Message-ID: | 9506.1108665176@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> Oh, and finally. The win32 commands have the following options:
> FILE_FLAG_NO_BUFFERING. This disables the cache completely. It also has
> lots of limits, like every read and write has to be on a sector boundary
> etc. It gives great performance with async I/O, because it bypasses the
> memory manager. It appears to be like O_DIRECT on linux?
> FILE_FLAG_WRITE_THROUGH:
> "
> Instructs the system to write through any intermediate cache and go
> directly to disk.
> If FILE_FLAG_NO_BUFFERING is not also specified, so that system caching
> is in effect, then the data is written to the system cache, but is
> flushed to disk without delay.
> If FILE_FLAG_NO_BUFFERING is also specified, so that system caching is
> not in effect, then the data is immediately flushed to disk without
> going through the system cache. The operating system also requests a
> write-through the hard disk cache to persistent media. However, not all
> hardware supports this write-through capability.
> "
AFAICS it would make sense for us to specify both of those flags for WAL
writes.
We could either hack win32_open() to translate O_SYNC to those flags,
or make xlog.c aware of the Windows spellings of the flags. Probably
the former is less painful given that open.c already does wholesale
translations of open() flags.
One point that I no longer recall the reasoning behind is that xlog.c
doesn't think O_SYNC is a preferable default over fsync. We'd certainly
want to hack xlog.c to change its mind about that, at least on Windows;
assuming that the FILE_FLAG way is indeed faster.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2005-02-17 18:36:31 | Re: win32 performance - fsync question |
Previous Message | Merlin Moncure | 2005-02-17 18:26:38 | Re: win32 performance - fsync question |