Database I/O Schemes

Database systems store data in a logical collection of disk files or disk partitions. The physically atomic unit of a database file is referred to as a database page. The typical size of a database page is 2KB and most databases don't allow the user to change this size. Oracle does, however, allow the administrator to define the page size at database creation time. The default page size of Oracle for NetWare is 4KB and the default page size of Oracle for UNIX, Microsoft NT, and OS/2 is 2KB. Changing the page size from the default has rarely demonstrated any measurable performance gains.

Physical reads and writes of the data are done by the database page. Therefore, disk requests are usually 2KB. There are some exceptions to this on large table scans. If the database system detects that a long scan will be done it will often read in larger blocks, but this feature doesn't usually change the tuning process.

The process of executing I/O routines is similar across most database systems. Reads of database pages are done by database process(es) or thread(s) for the application. Many read operations can usually be conducted in parallel and each is independent of each other. Writes of data pages, on the other hand, are not initiated by a user application. When an application updates or inserts new data, the change is actually put into the database cache by the application's database process. Some time later an independent database function will clean the dirty data pages from memory. These writes will usually occur as a large batch of asynchronous writes. How this is initiated and its frequency is beyond the scope of this paper. The point is that write operations are not usually a steady stream of single page writes, but periodic, heavy bursts of write operations. In contrast to the data pages, writes of transaction log pages is a very steady stream of single pages writes. These occur during update and insert operations and again is controlled by a background database process.