Section 14.4. Monitoring and Tuning the DB2 Agents


14.4. Monitoring and Tuning the DB2 Agents

It is crucial to make sure that the number of agents you configure in the database manager is enough to service your applications. If an agent is needed but is not available, the application will get an error. If it is a new database and you are not sure what its workload is going to be, use the database Monitoring tools to get a sense of what the workload is like.

The database manager Snapshot Monitor will give you the most information on DB2 agent usage (use the GET SNAPSHOT FOR DBM command). Figure 14.6 shows a snippet of the database manager snapshot output.

Figure 14.6. Example of database manager snapshot output
             Database Manager Snapshot Node type                                      = Enterprise Server Edition with local and remote clients Instance name                                  = db2inst1 Number of database partitions in DB2 instance  = 2 Database manager status                        = Active Product name                                   = DB2 v8.1.0.64 Service level                                  = s040321 (U488485) Start Database Manager timestamp               = 04/22/2004 19:49:39.258796 Last reset timestamp                           = Snapshot timestamp                             = 04/23/2004 15:04:29.606269 Remote connections to db manager               = 0 Remote connections executing in db manager     = 0 Local connections                              = 0 Local connections executing in db manager      = 0 Active local databases                         = 0 High water mark for agents registered          = 3 High water mark for agents waiting for a token = 0 Agents registered                              = 3 Agents waiting for a token                     = 0 Idle agents                                    = 2 Agents assigned from pool                      = 13 Agents created from empty pool                 = 6 Agents stolen from another application         = 0 High water mark for coordinating agents        = 1 Max agents overflow                            = 0 

When tuning MAXAGENTS, consider the Max agents overflow value. This is the number of times a request to create a new agent was received when the MAXAGENTS configuration parameter had already been reached. Increase MAXAGENTS if this value is not zero.

Remote connections to db manager and Remote connections executing in db manager indicate the number of remote connections and the number of remote connections that are currently active (i.e., they are processing a unit of work) respectively. If the number of remote connections is much larger than the number of active connections, that means most of the remote connections are idle.

This also applies to Local connections and Local connections executing in db manager. In this case, you may consider using the connection concentrator, which is explained in the next section.

The sum of Remote connections to db manager and Local connections gives you the total number of connections to the instance at the time the snapshot was taken.

The High water marks for agents registered indicates the highest number of coordinator agents and subagents being used concurrently, at some point in time.

Agents assigned from pool indicates the number of agents taken from the idle agents pool. Agents created from empty pool indicates the number of agents created because the idle agents pool was empty. If the ratio of Agents created from empty pool to the Agents assigned from pool is high, then you should increase NUM_POOLAGENTS.

The snapshot also shows the number of Idle agents and the High water mark for coordinating agents.

Use the snapshot frequently to analyze and get familiar with the type of workload on the instance. Setting the agents appropriately will save system resources and increase performance.



Understanding DB2(R. Learning Visually with Examples)
Understanding DB2: Learning Visually with Examples (2nd Edition)
ISBN: 0131580183
EAN: 2147483647
Year: 2004
Pages: 313

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net