# Reserve Memory

Specifies the amount of memory to reserve for use in emergency situations.

When Reserve Memory is non-zero, the daemon allocates a block of memory for use in emergency situations to prevent the EMS server from being unstable in low memory situations. When the daemon process exhausts memory resources, it disables clients and routes from producing new messages, and frees this block of memory to allow consumers to continue operation (which tends to free memory).

The EMS server attempts to reallocate its reserve memory once the number of pending messages in the server has dropped to 10% of the number of pending messages that were in the server when it experienced the allocation error. If the server successfully reallocates memory, it begins accepting new messages.

The Reserve Memory property only triggers when the EMS server has run out of memory and therefore is a reactive mechanism. The appropriate administrative action when an EMS server has triggered release of reserve memory is to drain the majority of the messages by consuming them and then to stop and restart the EMS server. This allows the operating system to reclaim all the virtual memory resources that have been consumed by the EMS server. A trace option, MEMORY, is also available to help show what the server is doing during the period when it is not accepting messages.

Specify size in units of MB. When non-zero, the minimum block is 16MB. When absent, the default is zero.

Note: There are a variety of limits that the user can set to prevent the EMS server from storing excessive messages, which can lead to situations where the EMS server runs out of memory. These include global properties, such as Max Msg Memory, as well as destination properties such as maxbytes. These limits should be used to prevent the reserve memory mechanism from triggering.

## Classic Configuration

The reserved memory is set using the reserve_memory property in the tibemsd.conf file:

    reserve_memory = size

## Administration Tool

This property cannot be set using the administration tool.

Copyright © Cloud Software Group, Inc. All rights reserved.