A Trip Down the Data Path: I/O and Performance Page 2 - EnterpriseStorageForum.com

A Trip Down the Data Path: I/O and Performance Page 2

Download the authoritative guide: Enterprise Data Storage 2018: Optimizing Your Storage Infrastructure

The I/O Path

Applications generally make requests to create files in one of at least two ways, both using POSIX standards calls.


  1. The file is created/opened with the open(2) system call, and I/O is made directly to the system via calls to the raw device, volume manager and/or file system using read(2), write(2), pread(2), pwrite(2) and/or the POSIX standard asynchronous I/O routines aio_read(3RT), aio_write(3RT), lio_listio(3RT).

  2. The file is created/opened with fopen(3) and I/O is done via the POSIX standard C library package (fread/fwrite/fprint). If a file is opened using fopen(3), the initial path through the system is different than when the file is opened using the open(2) system call. This method is typically used more often as it has fewer restrictions than using direct system calls.

Both of these methods work on UNIX, Windows, Linux and even mainframe systems as the POSIX standard is supported on all of them.


Using the C Library

With fopen(3), which uses the C library package (libc.a on UNIX and Linux systems), the data is moved from the user data space to a library buffer for each opened file. The C library is often called standard I/O. The size of this library buffer is by default:


OS Size in Bytes
Windows 4096 (the range of values supported are from 2 to 32768 bytes)
Linux 8192
Solaris 8192
AIX 4096
SGI 4096

Table 1. Buffer Sizes for Standard I/O

It should be noted that the actual memory size of the library buffer is really 8 bytes greater than the actual buffer size. These 8 bytes are used for pointer and control information for the buffer.

Page 3: Using the C Library (Continued)


Page 2 of 5

Previous Page
1 2 3 4 5
Next Page

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Storage Daily
Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that enterprisestorageforum.com may send you ENTERPRISEStorageFORUM offers via email, phone and text message, as well as email offers about other products and services that ENTERPRISEStorageFORUM believes may be of interest to you. ENTERPRISEStorageFORUM will process your information in accordance with the Quinstreet Privacy Policy.

Thanks for your registration, follow us on our social networks to keep up-to-date