Saturday, April 6, 2013

Direct I/O

UNIX implements a layer of buffering or caching between the application and the device.  A high-performance application (e.g. database) may want to bypass this layer of complexity and manages its own I/O.  O_DIRECT specifies the I/O is done directly from user space buffers to the device, bypassing the page cache.  All I/O is synchronous.  The request length, buffer alignment, file offsets must all be integer multiples of the underlying device's sector size.

No comments: