You can do so even per-size via e.g. /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages
As discussed the later the allocation the higher the chance to fail, so re-check the sysfs file after each change if it actually got that much memory.
The default size is only a boot time parameter.
But you can specify explicit sizes in libvirt xml.
You can do so even per-size via e.g. /sys/kernel/ mm/hugepages/ hugepages- 1048576kB/ nr_hugepages
As discussed the later the allocation the higher the chance to fail, so re-check the sysfs file after each change if it actually got that much memory.
The default size is only a boot time parameter.
But you can specify explicit sizes in libvirt xml.