Databases Reference
In-Depth Information
Here are some causes of and associated solutions for memory bottlenecks:
Memory leaks —Memory leaks are often created when applications use
resources and don't release them when they are no longer required. Database
drivers have also been known to have memory leaks.
Insufficient physical memory (RAM) —Install more RAM to your system.
Poorly optimized application code —Develop or tune your application to
minimize memory use. See “The Database Application,” page 269.
Poorly configured database drivers —Understand the runtime perfor-
mance tuning options for the database driver you are using and configure
the driver to use the appropriate options to minimize memory use. See “The
Database Driver,” page 270.
To detect a memory bottleneck, gather information about your system to answer
the following questions:
How often are requested pages triggering a page fault? This information
gives you an idea of the number of total page faults, both soft and hard page
faults, that occur over a period.
How many pages are retrieved from disk to satisfy page faults? Compare
this information to the preceding information to determine how many hard
page faults occur out of the total number of page faults.
Does the memory use of any individual application or process climb
steadily and never level off? If so, that application or process is probably
leaking memory. In pooled environments, detecting memory leaks is more
difficult because pooled connections and prepared statements hold onto
memory and can make it appear as if your application is leaking memory
even when it isn't. If you run into memory issues when using connection
pooling, try tuning the connection pool to reduce the number of connec-
tions in the pool. Similarly, try tuning the statement pool to reduce the num-
ber of prepared statements in the pool.
Disk
When an operation reads or writes to disk, performance suffers because disk
access is extremely slow. If you suspect that disk access occurs more often than it
should, first rule out a memory bottleneck. For detailed information about disk,
see “Disk,” page 110.
Search WWH ::




Custom Search