My Oracle Support Banner

Using O_DIRECT on Linux Results in Errors (Doc ID 945539.1)

Last updated on MAY 29, 2020

Applies to:

Berkeley DB - Version 4.2 to 4.7
UnitedLinux (32-bit)
Linux x86
Linux on IBM Z
Generic Linux
Miracle Linux x86
Haansoft Linux Itanium
Embedded Linux SH4
Obsolete Linux Intel (64-bit)
Red Hat Enterprise Linux Advanced Server x86-64 (AMD Opteron Architecture)
Oracle Enterprise Linux 4.0
IBM: Linux on POWER Big Endian Systems
Haansoft Linux x86
IBM S/390 Based Linux (31-bit)
Red Hat Enterprise Linux Advanced Server Itanium
x86 64 bit
Miracle Linux x86-64
SUSE \ UnitedLinux x86-64
Linux x86-64
z*OBSOLETE: IBM Linux on POWER Systems - alternate
x86 32 bit
UnitedLinux Itanium
Miracle Linux Itanium
Red Hat Enterprise Linux Workstation
Haansoft Linux x86-64
Embedded Linux xScale
Linux Itanium


To avoid double buffering on platforms that allow it, and use direct I/O, Berkeley DB needs to be built with --enable-o_direct configuration option and the DB_DIRECT_DB and DB_DIRECT_LOG flags should be used in the application.

When Berkeley DB is built with that configuration on Linux 2.4/2.6 calls to read and write fail with an "Invalid argument" error message as illustrated below:


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.