[PVE-User] Hotplug Memory and default Linux kernel
Anderson, Stuart B.
sba at caltech.edu
Tue Aug 29 23:04:41 CEST 2023
That looks so promising, but it is not working for PVE8+EL9 or PVE7+EL8. Perhaps there is an additional qemu setting that is needed?
[root at pcdev15 ~]# grep memhp /proc/cmdline
BOOT_IMAGE=(hd0,msdos1)/vmlinuz-5.14.0-284.25.1.el9_2.x86_64 root=/dev/mapper/system-root ro crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M rd.lvm.lv=system/root selinux=0 memhp_default_state=online
#
# which did change the value of,
#
[root at pcdev15 ~]# cat /sys/devices/system/memory/auto_online_blocks
online
#
# but leaves lshw reporting a single 1GB bank of memory,
#
[root at pcdev15 ~]# lshw -class memory
*-firmware description: BIOS
vendor: SeaBIOS
physical id: 0
version: rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org
date: 04/01/2014
size: 96KiB
*-memory
description: System Memory
physical id: 1000
size: 32GiB
capabilities: ecc
configuration: errordetection=multi-bit-ecc
*-bank
description: DIMM RAM
vendor: QEMU
physical id: 0
slot: DIMM 0
size: 1GiB
#
# and the kernel running with small default parameters,
#
[root at pcdev15 ~]# grep processes /proc/$(pgrep systemd-logind)/limits
Max processes 2659 2659 processes
Note, the above is running with the suggested udev rule as well, but that appears to be for cpu rather than memory,
[root at pcdev15 ~]# cat /lib/udev/rules.d/80-hotplug-cpu.rules
SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", ATTR{online}="1"
Thanks.
> On Aug 29, 2023, at 3:00 AM, pve-user-request at lists.proxmox.com wrote:
>
> Hi,
>
> see
> https://pve.proxmox.com/wiki/Hotplug_(qemu_disk,nic,cpu,memory)#Memory_Hotplug
>
>
> 2 possiblity:
>
> add "memhp_default_state=online" to grub
>
> or
>
> add udev script
> /lib/udev/rules.d/80-hotplug-cpu.rules
>
> SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0",
> ATTR{online}="1"
>
>
>
> When hotplug is enabled, only 1GB of "static" memory is enabled (to
> boot the kernel,...).
> Then the other memory modules, are hotpluggable, and by default are
> offline.
--
Stuart Anderson
sba at caltech.edu
More information about the pve-user
mailing list