DB2 10.5 for Linux, UNIX, and Windows

java_heap_sz - Maximum Java interpreter heap size configuration parameter

You can use this parameter to determine the maximum size of the heap that is used by the Java™ interpreter started to service Java DB2® stored procedures and UDFs.

Configuration type
Database manager
Applies to
  • Database server with local and remote clients
  • Client
  • Database server with local clients
  • Partitioned database server with local and remote clients
Parameter type
Configurable
Default [range]
HP-UX
4096 [0 - 524 288]
All other operating systems
2048 [0 - 524 288]
Unit of measure
Pages (4 KB)
When allocated
When a Java stored procedure or UDF starts
When freed
When the db2fmp process (fenced) or the db2agent process (trusted) terminates.

There is one heap per db2fmp process running a Java stored procedure. For multithreaded db2fmp processes, multiple applications using threadsafe fenced routines are serviced from a single heap. In all situations, only the processes that run Java UDFs or stored procedures ever allocate this memory. On partitioned database systems, the same value is used at each database partition.

XML data is materialized when passed to stored procedures as IN, OUT, or INOUT parameters. When you are using Java stored procedures, the heap size might need to be increased based on the quantity and size of XML arguments, and the number of external stored procedures that are being executed concurrently.