O_DIRECT

Started by Christopher Kings-Lynneover 24 years ago3 messageshackers
Jump to latest
#1Christopher Kings-Lynne
chriskl@familyhealth.com.au

The O_DIRECT flag has been added in FreeBSD 4.4 (386 & Alpha) also. From
the release notes:

Kernel Changes

The O_DIRECT flag has been added to open(2) and fcntl(2). Specifying this
flag for open files will attempt to minimize the cache effects of reading
and writing.

See: http://www.freebsd.org/releases/4.4R/relnotes-i386.html

#2Bruce Momjian
bruce@momjian.us
In reply to: Christopher Kings-Lynne (#1)
Re: O_DIRECT

The O_DIRECT flag has been added in FreeBSD 4.4 (386 & Alpha) also. From
the release notes:

Kernel Changes

The O_DIRECT flag has been added to open(2) and fcntl(2). Specifying this
flag for open files will attempt to minimize the cache effects of reading
and writing.

I wonder if using this for WAL would be good.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#3Zeugswetter Andreas SB SD
ZeugswetterA@spardat.at
In reply to: Bruce Momjian (#2)
Re: O_DIRECT

The O_DIRECT flag has been added to open(2) and fcntl(2). Specifying

this

flag for open files will attempt to minimize the cache effects of

reading

and writing.

I wonder if using this for WAL would be good.

Not before the code is not optimized to write more than the current 8k
to
the WAL at a time.
(The killer currently are larger transactions that produce approx more
than 64k WAL, (try the open_datasync setting with "copy from"))

Andreas