SUSE Support

Here When You Need Us

Unable to set kernel.shmmni to a value greated than 32k (32768)

This document (000020403) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15 SP2 (and newer)

Situation

Unable to set kernel.shmmni to a value greater than 32k (32768).

Adding for example kernel.shmmni=65536 to /etc/sysctl.conf results in systemd-sysctl service failure to apply kernel variables.

Also, manually calling the same values fail :
# sysctl -w kernel.shmmni=65536
sysctl: setting key "kernel.shmmni": Invalid argument kernel.shmmni = 65536

 

Resolution

edit /etc/default/grub :

Append ipcmni_extend to GRUB_CMDLINE_LINUX  and run 
# update-bootloader

to update the bootloader settings. On the next boot:
# sysctl -w kernel.shmmni=65536

will be applied correctly.

Cause

Older kernels are limited to a 32k size limit but did not actively check the set limit

Additional Information

The sysctl parameter kernel.shmmni have an inherent limit of IPC_MNI (32k), older versions of the Linux kernel didn't check the limit (SUSE Linux Enterprise releases older than 15 SP2), and that allowed users to set it beyond that without getting any error, implying that the settings were correctly applied, while the actual used value was always subject to the 32k limit.

The following kernel commit rectified that :
6730e6580177d: ipc: IPCMNI limit check for msgmni and shmmni

And added the possibility to increase the IPCMNI limit from 32k to 8M if the users really want the extended value, and that can be achieved by adding 'ipcmni_extend' to the kernel boot parameters.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020403
  • Creation Date: 01-Oct-2021
  • Modified Date:06-Oct-2021
    • SUSE Linux Enterprise Server
    • SUSE Linux Enterprise Server for SAP Applications

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.