book
Article ID: KB0091526
calendar_today
Updated On:
Description
Resolution:
First, there are lot of factors that can cause the EMS server process memory footprint to grow beyond your expectations, such as:
-- Number of the pending messages
-- Buffers for each connected connections
-- Number of durables
-- Number of connection objects, session objects, producers, consumers, temporary destinations ......
-- How badly the db files are fragmented
-- How many pending messages in the CM ledger file, if you export EMS messages to RV CM messages
-- The size of reserved memory
-- Number of routes
-- ......
For more detail, please refer to FAQ1-8IM7BH Why is my EMS server footprint very large?
One of frequently noticed factor that caused EMS server high memory usage problem was huge number of pending messages.
If this is your case, you should configure max_msg_memory and enable msg_swapping to limit the memory allocated to hold messages.
If the parameter msg_swapping is set to enabled, message could be swapped out to the datastore. For more information regarding when
Messages will be swap out, please refer to FAQ1-9BA0IC "When will EMS server swap out message?"
Even when messages are persisted or swapped-out, the server maintains what we call a message shell in memory. This structure contains information necessary for message processing. The size will vary depending on the EMS version, platform (32-bit vs 64-bit), state of the message (if message is waiting on outstanding acks, ...), etc... so it is almost impossible to give a number, but you can expect to be at least a minimum of 400 bytes."
In most typical use cases, the tibemsd's process memory can be 4 or 5 times bigger than the size of max_msg_memory. Therefore, you should choose a setting that is at most 1/4 of the process memory limit on your OS, and run some tests to simulate the real production environment to fine tune this value. E.g. if you run 32bit tibemsd on Windows, you should not set max_msg_memory bigger that 512MB since a 32bit process is limited by Windows to 2GB.
Again, since different use cases will lead to different Message Memory Usage / Process Size ratios, you have to tune the value based on your production like environment.
Issue/Introduction
How should I configure max_msg_memory on my machine to limit EMS server memory usage?