This is a draft document that was built and uploaded automatically. It may document beta software and be incomplete or even incorrect. Use this document at your own risk.

Jump to content
Mastering Memory Hotplugging
SUSE Linux Enterprise Server 16.1

Mastering Memory Hotplugging

Publication Date: 16 Oct 2026

Memory hotplugging on SUSE Linux Enterprise Server 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

  • Access to the system's BIOS/UEFI settings

1 About memory hotplugging

Memory hotplugging 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 hotplugging 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 hotplugging allows for inserting a new DIMM into an empty slot or exchange a failing memory module without causing downtime.

1.1 What is memory hotplugging used for?

Memory hotplugging 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 hotplugging

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

  1. Open the file /etc/default/grub for editing.

  2. Modify the line GRUB_CMDLINE_LINUX_DEFAULT as 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 /sys the 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, which ensures the kernel never writes unmovable core system files to the new stick, allowing you to safely hot-unplug it later if needed. In specific hardware configurations, such as when GPGPUs are accessing CXL memory, relying on the ZONE_MOVABLE may not be appropriate.

  3. Save the file and update the boot loader:

    • On a mutable system:

      > sudo  grub2-mkconfig -o /boot/grub2/grub.cfg
      1. On an immutable system

        > sudo  transactional-update grub.cfg
      2. Reboot 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:

  1. Verify the slot status by running the command:

    > sudo ls /sys/devices/system/memory/
  2. 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.

  3. Verify that the machine successfully accepted the hardware by running:

    > sudo grep .
          /sys/devices/system/memory/memory*/state

    The new memoryXXX directories appear at the bottom of the list, all automatically marked as online.

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 -h to 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 numactl or using the mbind() system call

    • If 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

    • If your system utilizes GPGPUs accessing CXL memory, the ZONE_MOVABLE configuration may not be supported. Because the kernel cannot guarantee the safe migration of memory pages in this specific hardware configuration, dynamically unplugging this memory later may be restricted or impossible without causing system instability.

After these checks, proceed as described bellow:

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

    > sudo  ls /sys/devices/system/node/nodeX/
  2. Make the RAM module offline by running:

    >  echo offline | sudo tee /sys/devices/system/memory/memoryXXX/state
  3. Verify that the memory module is correctly set to offline by running the following command:

    > cat
          /sys/devices/system/memory/memoryBLOCK_ID/state

    The command must state offline.

  4. Remove the DIMM module from the slot.