DB2 Version 10.1 for Linux, UNIX, and Windows

aslheapsz - Application support layer heap size configuration parameter

The application support layer heap represents a communication buffer between the local application and its associated agent. This buffer is allocated as shared memory by each database manager agent that is started.

Configuration type
Database manager
Applies to
  • Database server with local and remote clients
  • Database server with local clients
  • Partitioned database server with local and remote clients
Parameter type
Configurable
Default [range]
15 [1 - 524 288]
Note: The default value is subject to change by the DB2® Configuration Advisor after initial database creation.
Unit of measure
Pages (4 KB)
When allocated
When the database manager agent process is started for the local application
When freed
When the database manager agent process is terminated
If the request to the database manager, or its associated reply, do not fit into the buffer they will be split into two or more send-and-receive pairs. The size of this buffer should be set to handle the majority of requests using a single send-and-receive pair. The size of the request is based on the storage required to hold:
  • The input SQLDA
  • All of the associated data in the SQLVARs
  • The output SQLDA
  • Other fields which do not generally exceed 250 bytes.
In addition to this communication buffer, this parameter is also used for two other purposes:
  • It is used to determine the I/O block size when a blocking cursor is opened. This memory for blocked cursors is allocated out of the application's private address space, so you should determine the optimal amount of private memory to allocate for each application program. If the Data Server Runtime Client cannot allocate space for a blocking cursor out of an application's private memory, a non-blocking cursor will be opened.
  • It is used to determine the communication size between agents and db2fmp processes. (A db2fmp process can be a user-defined function or a fenced stored procedure.) The number of bytes is allocated from shared memory for each db2fmp process or thread that is active on the system.

The data sent from the local application is received by the database manager into a set of contiguous memory allocated from the query heap. The aslheapsz parameter is used to determine the initial size of the query heap (for both local and remote clients). The maximum size of the query heap is defined by the query_heap_sz parameter.

Recommendation: If your application's requests are generally small and the application is running on a memory constrained system, you might want to reduce the value of this parameter. If your queries are generally very large, requiring more than one send and receive request, and your system is not constrained by memory, you might want to increase the value of this parameter.

Use the following formula to calculate a minimum number of pages for aslheapsz:
    aslheapsz >= ( sizeof(input SQLDA)
                 + sizeof(each input SQLVAR)
                 + sizeof(output SQLDA)
                 + 250 ) / 4096
where sizeof(x) is the size of x in bytes that calculates the number of pages of a given input or output value.

You should also consider the effect of this parameter on the number and potential size of blocking cursors. Large row blocks might yield better performance if the number or size of rows being transferred is large (for example, if the amount of data is greater than 4096 bytes). However, there is a trade-off in that larger record blocks increase the size of the working set memory for each connection.

Larger record blocks might also cause more data than required to be block fetched by the application. You can control the number of fetch requests using the OPTIMIZE FOR clause on the SELECT statement in your application.