SUSE Support

Here When You Need Us

System fails to boot due to excessive use of HugePages

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

Environment

SUSE Linux Enterprise Server 15


Situation

The system fails to boot and processes are unable to run due to insufficient free memory. The logs show that the boot process is unable to allocate enough memory for  processes. Increasing  memory may allow the system to boot, but it will eventually run out of memory once the application starts.

postgresql-script[6710]: 2025-03-19 11:55:05.147 CET   [6710]FATAL:  could not map anonymous shared memory: Cannot allocate memory

This error will be visible if the system crashes.

       PANIC: "Kernel panic - not syncing: System is deadlocked on memory"

 

Resolution

The system must have sufficient memory to meet the vendor requirements and recommendations for running the required applications and databases.

The initramfs must be rebuilt every time the sysctl values are modified. The commands mkinitrd (deprecated) or dracut can be used to rebuild the initramfs.

Cause

Looking into RAM usages, we can see that HugePages are configured and free memory is low. This can be seen in /proc/meminfo:  

MemTotal:        2831484 kB
MemFree:           24736 kB
...
HugePages_Total:    1000
HugePages_Free:     1000

Using sysctl, HugePages are configured: 

# sysctl vm.nr_hugepages
vm.nr_hugepages = 1000

The following command didn't output any value, which indicates that no value was set for vm.nr_hugepages:

# find /proc/sys /etc/sysctl.d/*.conf /run/sysctl.d/*.conf /usr/local/lib/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /lib/sysctl.d/*.conf /etc/sysctl.conf -type f -exec grep vm.nr_hugepages {} \;  2> /dev/null
# 

Checking initramfs, it seems it includes files from /etc/sysctl.d/*

# lsinitrd | grep etc/sysctl.d
drwxr-xr-x   1 root     root            0 Mar 19 10:18 etc/sysctl.d
-rw-r--r--   1 root     root           92 Jun 17  2022 etc/sysctl.d/70-yast.conf
-rw-r--r--   1 root     root           21 Mar 19 10:17 etc/sysctl.d/90.my-settings.conf

From above, the initramfs has an extra file inside etc/sysctl.d directory called 90.my-settings.conf. We can display the content of this file via:  

# lsinitrd -f etc/sysctl.d/90.my-settings.conf
vm.nr_hugepages=1000

While recreating the initramfs, the 90.my-settings.conf will be removed if it doesn't exist anymore in the /etc/sysctl.d/ directory. 

# ll /etc/sysctl.d/
total 4
-rw-r--r-- 1 root root 92 Jun 17  2022 70-yast.conf
# dracut -f
....
# lsinitrd | grep etc/sysctl.d
drwxr-xr-x   1 root     root            0 Mar 19 12:21 etc/sysctl.d
-rw-r--r--   1 root     root           92 Jun 17  2022 etc/sysctl.d/70-yast.conf

Additional Information

The system won't boot if HugePages are overcommitted. To resolve this issue,  either add more memory or rebuild the initramfs while in rescue mode.

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:000021748
  • Creation Date: 19-Mar-2025
  • Modified Date:31-Mar-2025
    • SUSE Linux Enterprise Server

< 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.