Application Support Layer Heap Size (aslheapsz)

Configuration Type
Database manager

Applies to

Parameter Type
Configurable

Default [Range]
15 [ 1 - 524 288 ]

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

Related Parameters
Query Heap Size (query_heap_sz)

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.

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:

In addition to this communication buffer, this parameter is also 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 database client cannot allocate space for a blocking cursor out of an application's private memory, a non-blocking cursor will be opened.

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 may wish 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 may wish to increase the value of this parameter.

Use the following formula to calculate the number of pages for aslheapsz:

    aslheapsz >= ( sizeof(input SQLDA)
                 + sizeof(each input SQLVAR)
                 + sizeof(output SQLDA)
                 + 250 ) / 4096

You should also consider the effect of this parameter on the number and potential size of blocking cursors. Large row blocks may 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 may also cause more fetch requests than are actually required by the application. You can control the number of fetch requests using the OPTIMIZE FOR clause on the SELECT statement in your application.