BoKS needs a certain amount of shared memory reserved in order to function.
The Server Agents will work with the default setting, but the Master and Replicas will usually need to increase the amount as the database, with users and Access Routes, grows.
The parameter controlling this is SHM_SIZE in the $BOKS_etc/ENV file, that specifies how many kilobytes of memory to reserve.
Calculating how much memory is needed is rather difficult since many factors are involved, so a much better approach is to check how much shared memory is available and simply double it until at least 30% is free. As unprecise as this approach may seem, it never causes any problems since the amount needed is commonly a mere fraction of the memory capacity of a modern server.
For optimal performance, BoKS needs the 30% free shared memory in order to prevent fragmentation.
So, to check current memory size, run the following from a BoKS prompt*:
The output will be something like this:
Total: 1023968, Free: 949824, Used: 74144, Largest free: 944896
Where you want to make sure that Free is at least 30% as big as Total.
To read the current setting you can use
cadm -E SHM_SIZE
and to change the setting
cadm -E SHM_SIZE=
In order for the setting to have effect, you have to restart BoKS and also make sure that the old shared memory is released. To do this, run:
(just running Boot will not be enough).
The shared memory setting must be exactly the same on the Master as on all Replicas or data on the Replicas may be incomplete, so once the setting is changed on the Master you must log in to each Replica to change the setting and restart BoKS.
The Master will warn to $BOKS_var/boks_errlog, and also make an audit log (label shm_warn) if free memory falls below a certain limit. By default the limit is 30%, but that can be changed using the $BOKS_etc/ENV variable FREE_SHARED_MEMORY_LIMIT (in % free memory) (BoKS restart required).
*Start a BoKS prompt using the command:
provided BoKS is installed as per default in /opt/boksm/.
Still have questions? We can help. Submit a case to Technical Support.