IBM Books

Agent Stack Size (agent_stack_sz)

Configuration Type
Database manager

Applies to

Parameter Type
Configurable

Default [Range]

OS/2
64 [ 8 - 1000 ]

NT
16 [ 8 - 1000 ]

Unit of Measure
Pages (4KB)

When Allocated
When an agent is initialized to do work for an application

When Freed
When an agent completes the work to be done for an application

The agent stack is the virtual memory that is allocated by DB2 for each agent. This memory is committed when it is required to process an SQL statement. You can use this parameter to optimize memory utilization of the server for a given set of applications. More complex queries will use more stack space, compared to the space used for simple queries.

This parameter does not apply to UNIX-based platforms.

Recommendation: In most cases you should be able to use the default stack size. Only if your environment includes many highly complex queries should you need to increase the value of this parameter. If the stack size is not large enough to process your SQL statement, an error entry will be logged to the db2diag.log file, and an SQL code will be issued. You need to increase agent_stack_sz and restart the database instance.

You may be able to reduce the stack size in order to make more address space available to other clients, if your environment matches the following:

The agent stack size and the number of concurrent clients are inversely related. For example, a larger stack size reduces the potential number of concurrent clients that can be running.

[ Top of Page | Table of Contents | Glossary | Index ]

[ DB2 List of Books | Search the DB2 Books ]