Databases Reference
In-Depth Information
How often is the disk busy? If your disk has a sustained rate of disk activity
of 85% or more for a sustained period of time and a persistent disk queue,
you may have a disk bottleneck.
Tuning Your Application to Avoid Unnecessary Disk Reads/Writes
Here are some general guidelines to help your application avoid unnecessary disk
reads and writes:
Avoid stretching memory to its limit —Once memory is used up, paging to
disk occurs. See “Memory,” page 107, for information about detecting and
avoiding a memory bottleneck.
Avoid using auto-commit mode for transactions —When using transac-
tions, the database writes every modification made by a transaction to a log
that is stored in database memory. A commit tells the database to make those
changes permanent. In response, the database writes the changes to disk and
flushes the log. In auto-commit mode, transactions are committed automat-
ically by the database, or if the database doesn't support auto-commit mode,
by the database driver. You can minimize disk access by using manual com-
mits. See “Managing Commits in Transactions,” page 22, for more informa-
tion.
CPU (Processor)
The CPU is the brain of your database server (or application server), performing
most of the calculations and logic required to retrieve data or modify database
tables. When the CPU is overly busy, it processes work slowly and may even have
jobs waiting in its run queue. When the CPU is too busy to respond to work
requests, performance of the database server or application server rapidly hits a
ceiling. For example, Figure 4-20 shows benchmark runs of the same driver on
different machines with different CPU capacity. As you can see, when run on the
machine that is not CPU-bound, performance steadily climbed. On a machine
that is CPU bound, performance is capped by the CPU.
Table 4-6 lists some common causes for CPU bottlenecks and their recom-
mended solutions.
 
Search WWH ::




Custom Search