注意: Linux 中热添加cpu/内存,内核要更新设备映射和上下文切换等,

小应用系统添加时几乎没有无影响

<span style="color: rgb(255, 0, 0);">大应用系统添加时滞后时间长,有类似断网,不可用现象</span>

![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATMAAAC2CAYAAAC1UmqBAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAB0TSURBVHhe7Z1rrsU2joSTQW8q+/+RTTXQ0zVIYeoQpEXJki3b/ADiShTFl3yU80i6//zPf/mjKIri4fzPP3+LoigeTV1mRVG8grrMiqJ4BXWZFUXxCuoyK4riFdRlVhTFK6jLrCiKV1CXWVEUr6Aus6IoXkFdZkVRvIK6zIqieAV1mV3An3/++c/o//F0o2R8ZeOdzas3zlXxdiDK9UwNvT5VvyKfO/n5D81tEUf/DbpXMO2xhjFt7BhYG8L1HqwP4PlRuyiOtWGeo0T7z/oFmquFvjM2ypm8snvVbjRepi5r48VhfNrasaL+PF8tGMsS6TP0+lT9rHxoj7/Ajgl1Sk+cFj/vzOCYcgSTt6LQxo4V62eETC7A2mFuydjMBP7PxGCeOlYd0LmuU7cC1rWyf1qD1kQd8HQeyJM2Olaop6ys7Ym0emj7R5lJ98dML1EPtYnsrR7zFQ9JJmfPxs5hE4kH9FFc6CnR/p3QWq0omB/VxvWd0Hy83DI5wyaSO4h6v4pWD6/g8d+Z8dBaB0WbjG0EYkVyBuwfzekqbL0qijdnbfhr158CnxuKhb3w5C4QW3PeJZdVvOIHAD40R82ijcpK7n54doVnpGfFvztjn52nnO1O+TIPPfuZvOrXTG3WCngInrwdr2ZKFp6PCvVPx+sLZReQyw695tnP7k33ZTYzCetnpNmZXDI5ezZ2DptIlN46eu3vQGu1QjD2eqg2T8Sry8JeeEIwzvYH+lbMs/Tkc5bVtYDw/wOgVZSXHO11b2usfrjWg+4nkR9ra+28debZQ2ZPK5deMv6yNjNzyfThqtpb+mhMMnEyqJ/IB228dZuHovbZfDP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4AQCNajWLNipXcFWcp8Az0rOKzmwn7LOzw7mibzPyuKomxtCzn8mrfs3UZq2Ah+DJ2/FqpmTh+ahQ/3S8vlBWAL8r+rbKr8Kzn92b7stsZhLWz0gjM7lkcvZs7Bw2kfQAey9Wr58r0VqtEIyfVlcGry4Le+EJwTjbH+ijmNGenYlqmcnQr5nAS472urc1Vj9c60H3k8iPtbV23jrz7KEVh6hdbwxLJmbWZmYuLV+z44GeulQfjUkmTgb1E/mgjbdu8yBqG9mAI7uRmuCD+47GlpFYR9z2XwBooR5e8ZYrUm/lWRTFHmx7me1CXWZF8Qxe9QNAURTfxX1nxo949Y7kG9iP9G8793qev0FdZgtoXQ52Xbm758jtbA6t+pUZ8Vownx16azmTU7bPV/R4B277zuyteA9O9mEafegy+1bnQHr2wxZcFe9uvFxH82/tY2/JU3p0hrrMiqJ4BfUDQFEUr6Aus6IoXkFdZkVRvIK6zIqieAF//PG/rzFNdKQ6MjoAAAAASUVORK5CYII=)

[https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=2077955](https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=2077955)

已在 Linux 中热添加的内存不会在客户机中使用 free 或 top 命令注册。

Cause

Linux 需要手动干预来公开在客户机中新添加的内存时,会出现此问题。此过程称为将内存设置为联机。

Resolution

要解决此问题,请在 RHEL、CentOS 和 SLES 操作系统中设置内存联机。

<span style="color: rgb(255, 0, 0);">注意:linux新内核会自动online,无需手动更新。</span>

要在 RHEL 和 CentOS 中设置内存联机,请执行以下操作:

查找显示脱机的内存。检查内存的状态:

grep line /sys/devices/system/memory/*/state

内存显示脱机时,将其设置为联机:

echo online &gt; /sys/devices/system/memory/memory[number]/state

要在 SLES 操作系统中设置内存联机,请执行以下操作:

加载 SLES 的 acpiphp 模块以检测热添加设备:

modprobe acpiphp

在 SLES 虚拟机内启用 acpi_memhotplug:

modprobe acpi_memhotplug

使用 vSphere Client 编辑虚拟机设置以增加分配的内存。有关详细信息,请参见 Increasing the amount of memory assigned to a virtual machine (1004059)。

在 /sys/devices/system/ 中使内存联机:

echo online &gt; /sys/devices/system/memory/memory[number]/state

检查内存的状态,查找显示脱机的内存:

grep line /sys/devices/system/memory/*/state

内存显示脱机时,将其设置为联机:

echo online &gt; /sys/devices/system/memory/memory[number]/state

验证是否可以查看额外内存:

free -m

Additional Information

有关详细信息,请参见 Linux Memory Hotplug Support 中的&ldquo;How to use memory hotplug&rdquo;。

[http://lhms.sourceforge.net/](http://lhms.sourceforge.net/)