The label shm_warn appears in the BoKS audit log.

In BoKS v6.7 and later, the Master sends a warning to the audit log (label shm_warn) and $BOKS_var/boks_errlog if free memory falls below a certain limit.

By default the limit is 30%, but that can be changed by setting the $BOKS_etc/ENV variable FREE_SHARED_MEMORY_LIMIT (in % free memory) (BoKS restart required).

Resolution / Workaround

The parameter that controls shared memory size is SHM_SIZE in the $BOKS_etc/ENV file, which specifies how many kilobytes of memory to reserve.

For optimal performance, BoKS needs 30% free shared memory in order to prevent fragmentation, but in order to have some headroom it is recommended to aim for 50% since memory requirements will increase as users and servers in the domain grow in numbers.

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 50% is free. As imprecise 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.

So, to check current memory size, run the following command from a BoKS prompt:

dumpbase -m

The output will be something like this:

Total: 1023968, Free: 949824, Used: 74144, Largest free: 944896

Now you want to make sure that Free is at least 50% as big as Total.

To read the current setting you can use the following command:

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 the command:

Boot -k;Boot

(just running Boot will not be enough).

Finally, go back and run dumpbase -m again to verify the current status.

The shared memory setting must be exactly the same on the Master as on all Replicas, otherwise data on the Replicas may be incomplete. Once the setting is changed on the Master you must log in to each Replica to change the setting there and restart BoKS.

Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: June 28, 2019