Section 14.3. Tuning the Number of EDUs


14.3. Tuning the Number of EDUs

DB2 controls the instance-level EDUs: db2sysc, db2gds, db2fcmd, db2wdog, and the listener processes. You can control some but not all of the EDUs at the database level. For example, you can tune the number of page cleaners (db2pclnr) and prefetchers (db2pfchr) with the database configuration parameters NUM_IOCLEANERS and NUM_IOSERVERS respectively.

At the application level, you can only tune the DB2 agents. The following Database Manager Configuration parameters control the number of different types of agents,

  • MAXAGENTS indicates the maximum number of DB2 agents, both coordinator agents and subagents, available at any time.

  • MAX_CONNECTIONS controls the maximum number of concurrent connections allowed to all the databases that share the same instance. These connections can be either active or inactive. An active connection means the application is doing a unit of work.

  • MAX_COORDAGENTS indicates the maximum number of coordinator agents that can exist at any time. It must be set to a value less than or equal to MAXAGENTS. By default, MAX_CONNECTIONS is set to MAX_COORDAGENTS. This means that each connection has a coordinator agent assigned to it. When MAX_COORDAGENTS is set less than MAX_CONNECTIONS, the connection concentrator is enabled (the connection concentrator is discussed in section 14.5, The Connection Concentrator).

  • MAXCAGENTS controls the maximum number of DB2 agents that can be working at any time. In other words, it controls the number of active connections. An application, even with a coordinator or subagent agent assigned, cannot do any work if the number of active applications has already reached MAXCAGENTS. The agent of this application is put to sleep and will wake up when other agents complete their work and the number of active agents falls below the limit. By default, MAXCAGENTS is set to MAX_ COORDAGENTS. Set this parameter to a value less than MAX_COORDAGENTS to limit the usage of system resources during times of peak processing.

  • NUM_POOLAGENTS determines the maximum size of the idle agent pool. If more agents are created than is indicated by the value of this parameter, they will be terminated when they finish executing their current request rather than be returned to the pool.

  • NUM_INITAGENTS determines the initial number of idle db2agents that are created in the agent pool at db2start time.

For example, assume the Database Manager Configuration file has these settings:

 Max number of existing agents        (MAXAGENTS)      = 200 Agent pool size                      (NUM_POOLAGENTS) = 100(calculated) Initial number of agents in pool     (NUM_INITAGENTS) = 0 

Because NUM_INITAGENTS is zero, there will be no db2agent (idle) processes displayed at db2start time. If NUM_INITAGENTS had been set to 4 before the db2start time, then these processes would have shown after issuing a db2start:

 db2inst1 35542 59814   0 16:25:57      -  0:00 db2agent (idle) db2inst1 43096 59814   0 16:25:57      -  0:00 db2agent (idle) db2inst1 49628 59814   0 16:25:57      -  0:00 db2agent (idle) db2inst1 58170 59814   0 16:25:57      -  0:00 db2agent (idle) 

After connecting to the SAMPLE database, the db2agent (SAMPLE) process appears. This process indicates there is in fact a connection to the SAMPLE database. If you issued the command

 db2 connect reset 

db2agent (SAMPLE) would become db2agent (idle). This is because NUM_POOLAGENTS is set to a number greater than zero, which means the agent will remain allocated in the pool even though it is idle. If NUM_POOLAGENTS had been set to zero, then after the connect reset command was issued, there would have been no db2agent process running.



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