How memory allocation works
A program "/usr/share/bm-pimp/bm-pimp" runs before the "init bluemind" scripts and reconfigures the components.
On start-up, this program displays the following outputs:
Spare memory is calculated as follows:
Usable memory is calculated by subtracting 4Gb to total machine memory.
60% of the resulting usable memory is then distributed between Java components. This portion is called spare memory.
From BlueMind version 3.0.10, usable memory is calculated by subtracting 5Gb to total machine memory.
Spare memory is then 50% of usable memory.
In the previous example, (based on version 3.0.9) spare memory is then 3063Mb:
Redistribution is done in a rules files "rules.json". Default rules contained in the "rules.json" file can be overloaded by the administrator.
To customize memory allocation rules on BlueMind start-up, you need to create a file "/etc/bm/local/rules.json" in which you specify product-specific rules.
Example of a "rules.json" file:
In this example:
bm-core gets 256Mb + 15% of spare memory, i.e. 459Mb:
bm-node will not be increased and will always get 128Mb, regardless of available memory.
- elasticsearch gets 128 + 40% of spare memory.
At the end of execution, bm-pimp writes a file "/etc/bm/default/<produit>.ini" with the new value for each product.
This file's content can be overloaded locally via the file "/etc/bm/local/<produit>.ini".
Logback configuration for each component is automatically extracted and saved in the file "/etc/bm/default/<composant>.log.xml" on component start-up.
This configuration can be overloaded (e.g. to be sent to a logstash / graylog2) by modifying a copy of this file in the folder "/etc/bm/local/<composant>.log.xml".