|
Q and A
Asked and Answered
Speeding Up Database Connections
How can you speed up database connections?
Ricardo Yokoyama
Nossa Caixa, Brazil
Scott Hayes responds:
When the DB2 database manager is first started, a minimal number of
processes are created within the
operating system. The actual number of
processes and amount of memory allocated depends on the operating system and
DB2 configuration values. Figure/Exhibit 1 shows a sample listing of DB2
AIX V7 processes and memory allocated after a 'db2start' command:
Figure 1.
The first connection to a database, or database activation, can cause
several more processes to be created, memory to be allocated,
and usually
disk I/O to allocate and format the active log files. Figure/Exhibit 2
shows a sample listing of DB2 AIX V7 processes and memory allocation after
the first connection to a minimally configured database has occurred.
Figure 2.
To ensure the fastest possible database connections:
1. Make sure that real memory on a machine is not over committed so that the
operating
system doen't have to perform paging in order to allocate memory
for DB2's processes.
2. Try to use the ACTIVATE DATABASE command so that processes, memory, and
DB2 logs are allocated prior to the first actual connection to the database.
3. If you can, make sure there are no DNS network configuration errors in
your network. If DB2 relies on DNS services for host name resolution and
your network configuration has errors, there could be connect delays beyond
the scope of DB2's control.
See a
complete archive of reader/author Q&As
.
Back to
Top 10 Performance Tips
by Scott Hayes.
|