There are no fixed rules about when to reorganize. There are two approaches to deciding when to reorganize, reactive and proactive, and you will probably do a mixture of both. When you initially install the application and set up the databases, a lot of the reorganization will be done reactively, as performance and space problems manifest themselves. As you develop a history of the behavior of the application and the databases, the scheduling of reorganization should become more proactive. Reactive ReorganizingReactive scheduling of reorganization is normally a result of perceived problems with the performance of the application, or problems with shortage of free space in the database. Where there are perceived application performance problems, closely monitor what the application is doing. The initial items to examine are the average and maximum online response times and the batch run times. Are they excessive for the amount of work the application is doing? The IBM Redbook IMS Version 7 Performance Monitoring and Tuning Update describes monitoring and investigating performance of IMS applications, and subsystems in great detail. Only after you have gone through the procedures detailed in the IBM Redbook IMS Version 7 Performance Monitoring and Tuning Update and identified potential problems with the databases should you start to look at reorganizing the database. Do not look only at the total time that the application program takes for database processing, but also look at the amount of database calls the application is processing. For example, if an online application is taking 10 seconds for database processing, but is reading 100150 database segments, then there might be little room for database tuning. However, you might want to look more closely at why, and whether, the application really needs to read all these segments. The solution to performance problems is normally an interactive process involving the database administrator, application developers, and the operating system support organization, because all three control areas that affect performance. When you encounter problems due to shortage of space in database data sets, there is little you can do but schedule a database reorganization to increase the database size. However, you should then acquire an understanding of the data growth rate. Consult with the application developers to gain this understanding. Also, a history of the volume of the application data stored in the database over time will help you determine the potential growth rate of the data. Questions to ask are whether growth will continue at the current rate or at a different rate, and whether this data all needs to be online. Remember that there are finite architectural limits to the size of the databases that vary depending on the IMS and operating system access methods. Proactive ReorganizationThe proactive approach to scheduling database reorganization relies on regular monitoring of the databases. For more information, see "Monitoring the Database" on page 126. In addition to monitoring the databases, you should maintain a history of the monitoring information you collect, so that you can analyze this information for trends and schedule database reorganization and restructuring before any problems occur. When you decide to make a change to a database, implement only one change at a time, if possible, and then monitor application performance before and after the change so that you can see what effect this one change had. The main things you do when you look at the monitoring data are to try to minimize the physical I/O for each database access and optimize the free space available in the database so it is not excessive, but is sufficient for normal update access on the databases. The physical I/O from the disk storage into the buffers in the IMS subsystem is the major component of the elapsed time for database access. You want to minimize this elapsed time by:
Monitoring the DatabaseMonitor your databases in order to determine when they need to be reorganized. Database monitoring falls into two categories: monitoring program and subsystem access to the databases, and monitoring the structure, space usage, and pointer chains in the actual database data sets. The principle tools provided by IMS that are used to monitor database access are:
Related Reading: There are a number of products available to let you monitor the databases and the data sets in which they are stored. For more information about these products, see Chapter 26, "IBM IMS Tools," on page 443. For information about monitoring program access to the database, see the IBM Redbook IMS Version 7 Performance Monitoring and Tuning Update. Sample Reorganization GuidelinesAlthough there are no fixed guidelines for when to reorganize an IMS database, the following guidelines were used successfully with a medium-sized commercial application using IMS HD databases stored in VSAM files. You might want to use these guidelines as a starting point for scheduling database reorganization and, when you have monitored the effects of the reorganization, adjust these parameters accordingly. HD Databases in General
HDAM Databases Only
VSAM or OSAM File
VSAM KSDS
DEDBs
|