I need to reserve 12288
hugepages for QEMU/KVM
virtual machines.
I followed the guide in 3 easy steps to configure hugepages in RHEL/CentOS 7/8 but it looks like in CentOS Stream 9 the configuration file /etc/sysctl.conf
is not for manual edit any more.
grep -i huge /proc/meminfo
AnonHugePages: 1986560 kB
ShmemHugePages: 0 kB
FileHugePages: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
when I try to modify the file nano /etc/sysctl.conf
it shows that this setting moved in another place
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
What is the proper way of hugepages configuration in CentOS Stream 9?