Messages were purposely sent a test EMS server. As soon as the server reached 512MB of memory usage we noticed the entry “Memory limit of 512 MB exceeded” in the server log file. Under what circumstances will reserve_memory be triggered?
Environment: =========== All
Resolution: = = = = = = Upon start-up, the EMS server allocates (malloc) the size of memory configured in the “reserve_memory” parameter (non zero). In this case, reserve_memory=256MB. When the EMS server starts up, the daemon will allocate a block of 256MB memory so that in case of an emergency situation, the server frees this block of memory to allow consumers to continue operation (which tends to free memory).
The EMS server runs into reserve memory when memory allocation calls fail, e.g. malloc returns NULL. This event can be triggered when the system is running out of memory or the tibemsd process memory limit is reached. The triggering of reserved memory is a defensive mechanism. Note that the EMS server going into reserve memory should not happen under normal operation and is intended for exceptional circumstances only. This is a recovery mechanism to allow the EMS server to attempt to free up memory and resume normal operation.
You would expect that theEMS server will begin using reserve memory when the “Memory limit of 512 MB exceeded” is reported. This is not necessarily true. When you see “Memory limit of 512 MB exceeded”, that means that the EMS server ran out of max_msg_memory limit. This condition alone may not trigger EMS server to run into reserve memory mode.
max_msg_memory value is the maximum memory the server can use for messages. This parameter lets you limit the memory that the server uses for messages so the server memory usage cannot grow beyond the system’s memory capacity. For details on max_msg_memory refer to FAQ1-9BCSZ8.
Issue/Introduction
When will the EMS server run into reserve memory mode?