Mastering Memory Hot Plugging
Memory hot plugging on SUSE Linux Enterprise Server for NVIDIA allows administrators to add or remove physical or virtual RAM while the system is running. By configuring motherboard firmware and kernel boot parameters, users can dynamically scale infrastructure or replace failing modules without system downtime or risking kernel panics.
Prerequisites
sudoprivilegesAccess to the system's BIOS/UEFI settings
1 About memory hot plugging #
Memory hot plugging allows you to add physical or virtual RAM to a computer system while the system is running, without needing to shut it down or reboot it.
Memory hot plugging differs according to the environment. In a virtual environment, when there is a demand to expand a virtual machine's allocated memory, the hypervisor plugs the memory to the guest system immediately. On physical hardware, the memory hot plugging allows for inserting a new DIMM into an empty slot or exchange a failing memory module without causing downtime.
1.1 What is memory hot plugging used for? #
Memory hot plugging allows for handling the following tasks without downtime:
adjusting the available physical memory of a machine. This is typical in virtual environment and with logical partitions.
replacing hardware, such as DIMMs or whole NUMA nodes. For example, replacing failed memory modules.
reducing energy consumption by unplugging memory modules either physically or logically
2 Configuring memory hot plugging #
To configure a bare-metal physical machine to accept a new memory module while running, you must configure both the hardware motherboard architecture (BIOS/UEFI) and the Linux kernel boot layout as described below.
2.1 Configuring the BIOS #
Before the operating system can even see a physical RAM module being added, the hardware must be configured to expect it. In the UEFI settings, enable the ACPI memory hot plugging and turn off NUMA/Node interleaving
2.2 Configuring the kernel boot parameters #
When Linux boots on bare metal, it maps out its internal tracking structure only for the exact physical RAM sticks detected at that particular moment. To make the machine accept a new physical module later, you must configure the kernel to reserve logical memory tracking slots for hardware that doesn't exist yet.
Open the file
/etc/default/grubfor editing.Modify the line
GRUB_CMDLINE_LINUX_DEFAULTas follows:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash memhp_default_state=online movablenode"memhp_default_state=online: configures the kernel to automatically import the new physical address blocks and transition them to online inside/systhe moment the hardware latch closes.movablenode: tells the kernel to treat any hot-plugged physical memory nodes as exclusively containing movable data. This is a crucial configuration safeguard; it ensures the kernel never writes unmovable core system files to the new stick, allowing you to safely hot-unplug it later if needed.
Save the file and update the boot loader:
On a mutable system:
>sudogrub2-mkconfig -o /boot/grub2/grub.cfgOn an immutable system
>sudotransactional-update grub.cfgReboot the system.
3 Inserting the memory module #
Once the system is configured and running, you can perform the physical installation. To do so, follow the steps bellow:
Verify the slot status by running the command:
>sudols /sys/devices/system/memory/Insert the RAM module. The motherboard firmware recognizes the new silicon, safely routes power to the slot, and broadcasts a physical ACPI interrupt signal (PNP0C80) directly to the host Linux kernel.
Verify that the machine successfully accepted the hardware by running:
>sudogrep . /sys/devices/system/memory/memory*/stateThe new
memoryXXXdirectories appear at the bottom of the list, all automatically marked asonline.
4 Unplugging a RAM module for a bare-metal machine #
To safely unplug a physical memory module from a running bare-metal machine, you must follow a multi-layered procedure to avoid electrical damage or an immediate kernel panic.
Before you unplug a RAM module, perform the following checks:
The system must have enough remaining memory to run properly. Run
free -hto verify available system memory.Check if any high-performance workloads (databases, JVMs, or CXL-bound applications) are pinned to the specific NUMA node you want to remove.
Look for applications launched with
numactlor using thembind()system callIf a process is strictly bound to that node, gracefully stop the application or alter its affinity settings. This operation might break the memory policy if there are applications pinned to the current NUMA node being removed
After these checks, proceed as described bellow:
Identify the Target Memory Blocks: You need to map the physical slot to the corresponding sysfs directories. You can find which memory blocks belong to which physical NUMA node by checking:
>sudols /sys/devices/system/node/nodeX/Make the RAM module offline by running:
>echo offline | sudo tee /sys/devices/system/memory/memoryXXX/stateVerify that the memory module is correctly set to by running the following command:
>cat /sys/devices/system/memory/memoryBLOCK_ID/stateThe command must state .
Remove the DIMM module from the slot.
5 Legal Notice #
Copyright© 2006– 2026 SUSE LLC and contributors. All rights reserved.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled “GNU Free Documentation License”.
For SUSE trademarks, see https://www.suse.com/company/legal/. All other third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its affiliates. Asterisks (*) denote third-party trademarks.
All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its affiliates, the authors, nor the translators shall be held liable for possible errors or the consequences thereof.