Chapter 8. Tuning DB2 for Content Manager 181
8.3 Regular routine maintenance
In this section, we describe what you need to do as routine maintenance to
ensure that your system is performing at the optimal level. The maintenance
tasks include:
Keeping up with the latest software fix packs
Monitoring system performance using the DB2 snapshot
Keeping database statistics and execution plans up to date by running
runstats and rebind commands
Reorganizing tables as necessary
Pruning log file regularly
Pruning diagnostics file
Cleaning up the event log
8.3.1 Keeping up with the latest software fix packs
Software bugs are found and software enhancements are continually being
developed. DB2 is no exception. It is extremely important to keep your software up
to the latest fix pack level so that you get the benefit of these software changes.
When calls to external support are placed, one of the first things they ask is
whether your software is at the latest fix pack level. If not, they typically ask you to
update to the latest version of the software before they continue to troubleshoot
your problem to avoid trying to solve a problem that has already been solved.
Check for new fix packs at least quarterly and whenever you see a recurring
problem that other tuning suggestions cannot fix.
Fix packs for DB2 can be found at:
http://www.ibm.com/software/data/db2/udb/support/
Always read the README.TXT file before installing the fix pack to be sure that all
prerequisites are known.
8.3.2 Monitoring system performance using DB2 snapshot
System monitoring helps you understand what is happening to the system and
what kind of action you might need to take. Monitor your system on a regular
basis to ensure that it is running healthy, and to profile system usage and
performance. To do this, we recommend using the DB2 monitoring tool snapshot.
Chapter 11, “Performance monitoring, analysis, and tracing” on page 281 goes
into great detail about the use of snapshot and other monitoring tools, and the
182 Performance Tuning for Content Manager
content of this section is derived from the way a particular client monitors their
system.
How to take a snapshot
1. DB2 monitors must be set on before they can collect data. It is not necessary
to turn on all of the monitors for regular maintenance. At a minimum, have the
DFT_MON_BUFPOOL, DFT_MON_LOCK, and DFT_MON_SORT turned on.
The other switches provide a great deal of data and could be turned on to
investigate a specific problem. The switches can be turned on as follows:
a. Click Programs IBM DB2 General Administration Tools
Control Center.
b. Change the following database instance parameters state to on:
DFT_MON_BUFPOOL
DFT_MON_LOCK
DFT_MON_SORT
DFT_MON_STMT
DFT_MON_TABLE
DFT_MON_TIMESTAMP
DFT_MON_UOW
HEALTH_MON
You can also turn on all monitoring switches through a DB2 command line:
update monitor switches using BUFFERPOOL on, LOCK on, SORT on,
STATEMENT on, TIMESTAMP on, TABLE on, UOW on
The database monitor switches must be turned on for sufficient time to allow
DB2 to collect meaningful data.
2. When you start database monitors, you also have to increase the database
manager monitor heap size (MON_HEAP_SZ) to allow enough memory
allocation to get the monitoring results:
a. Click Programs IBM DB2 General Administration Tools
Control Center.
b. Change the database instance parameter MON_HEAP_SZ to at least
2048.
3. Run snapshot from DB2 command window:
a. Click Start Run.
b. Type db2cmd.
c. Type the following command:
db2 get snapshot for all databases > fname.txt
fname is the name of the file the monitoring results will be saved in.

Get Performance Tuning for Content Manager now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.