Hot adding memory in Linux
search cancel

Hot adding memory in Linux

book

Article ID: 309841

calendar_today

Updated On:

Products

VMware Desktop Hypervisor VMware vSphere ESXi

Issue/Introduction

Symptoms:
Memory you have hot added in Linux is not registered in the guest using the free or top commands.

Cause

This issue occurs when Linux requires manual intervention to expose the newly added memory in the guest. The process is called setting the memory to online.

Resolution

To resolve this issue, set the memory online in RHEL, CentOS, and SLES OS.
  • To set the memory online in RHEL and CentOS:
  1. Look for memory that appears offline.

    Run this command to check the state of the memory:

    grep line /sys/devices/system/memory/*/state
     
  2. When memory appears offline, run this command to set it to online:

    echo online >/sys/devices/system/memory/memory[number]/state
     
  • To set the memory online in SLES OS:
    1. Run this command to load the acpiphp module for SLES to detect hot add devices:

      modprobe acpiphp
       
    2. Run this command to enable acpi_memhotplug within the SLES virtual machine:

      modprobe acpi_memhotplug
       
    3. Using vSphere Client edit the virtual machine settings to increase the memory assigned. For more information, see Increasing the amount of memory assigned to a virtual machine (1004059).
    4. Run this command to bring the memory online in /sys/devices/system/:

      echo online >/sys/devices/system/memory/memory[number]/state
       
    5. Run this command to check the state of the memory.

      Look for memory that appears offline:

      grep line /sys/devices/system/memory/*/state
       
    6. When memory appears offline, run this command to set it to online:

      echo online >/sys/devices/system/memory/memory[number]/state
       
    7. Verify you can see the extra memory by running this command:

      free -m


Additional Information

For more information, see How to use memory hotplug from Linux Memory Hotplug Support.
 
 
Note: The preceding link was correct as of August 26, 2015. If you find the link is broken, provide a feedback and a VMware employee will update the link.
Increasing the amount of memory assigned to a virtual machine
Agregar sin interrupción memoria en Linux
在 Linux 中热添加内存
Linux でのメモリのホット アド