Databases Reference
In-Depth Information
Disk contention occurs when multiple processes or threads try to access the
same disk simultaneously. The disk limits how many processes/threads can access
it and how much data it can transfer. When these limits are reached, processes
may have to wait to access the disk. Often, CPU activity is suspended until disk
access completes.
If you suspect that disk access occurs more often than it should, the first
thing you should do is rule out a memory bottleneck. Once you've ruled out a
memory bottleneck, make sure your application avoids unnecessary disk reads
and writes so that disk contention rarely happens.
Performance Tip
As a general rule, your application should only access the disk in the fol-
lowing cases: to retrieve database metadata into memory and to write
changes to disk, such as in the case of committing transactions.
Table 4-5 lists some common causes for disk bottlenecks and their recom-
mended solutions.
Table 4-5
Causes and Solutions of Disk Bottlenecks
Cause
Solution
Excessive paging caused by a
Detect and resolve the memory bottleneck. See
memory bottleneck
“Memory,” page 107, for more information.
Excessive reads or writes to disk,
Analyze and tune your application to avoid
possibly causing disk contention
unnecessary disk reads or writes. See “Tuning Your
Application to Avoid Unnecessary Disk
Reads/Writes,” page 112, for more information.
Detecting Disk Bottlenecks
To detect a disk bottleneck, gather information about your system to answer the
following questions:
Is excessive paging occurring? A memory bottleneck can resemble a disk
bottleneck so it's important to rule out a memory problem before you make
any disk improvements. See “Detecting Memory Bottlenecks,” page 108, for
information about detecting memory bottlenecks.
Search WWH ::




Custom Search