Database Tuning: Principles, Experiments, and Troubleshooting Techniques

The operating system performs several functions that can have a significant impact on database application performance.
The operating system schedules threads of control (called processes in some operating systems), the fundamental units of execution in a computer system. Issues here include the amount of time needed to schedule a new thread (the less the better); the time slice of a database thread (should be long); and whether different threads should have different priorities (database threads should all run at the same priority for most applications). Some database systems such as Sybase implement threads within operating system processes so the overhead of thread switching is potentially lower.
The operating system manages virtual and physical memory mappings. The issue here is how big to make the portion of virtual memory that is shared by all database threads, the database buffer, and how much random access memory to devote to that buffer.
The operating system controls the number of user threads that can access the database concurrently. The goal is to have enough to accommodate the available users while avoiding thrashing.
The operating system manages files. Issues here include whether the files can span devices (necessary for large databases); whether the files can be built from contiguous portions of the disk (helpful for scan performance); whether file reads can perform lookahead (also helpful for scan performance); whether accessing a page of a large file takes, on the average, more time than accessing a page of a small...