Limiting Db2 memory allocation

When Db2 uses a large amount of memory, you can limit the amount of memory that Db2 uses by issuing the db2 update command.

About this task

By default, Db2 is installed and configured to use automatic memory management, which causes Db2 to use a large percentage of the physical memory. To restrict the amount of memory, use the db2 update command to specify the memory limit.

Procedure

Issue the db2 update command:
db2 update dbm cfg using instance_memory memory_value
where memory_value is specified in 4 KB blocks.

Example

To limit the Db2 memory allocation to use 3,200,000 KB of memory, divide 3,200,000 KB by 4 KB blocks, which gives a result of 800000. Then, issue the following command:
db2 update dbm cfg using instance_memory 800000

For more information about instance memory configuration, see the Db2® product information.