February 2, 20251 yr I was experimenting with hugepages for a Windows gaming VM. Looks like Unraid defaults to 2M but if you want to set 1G, it doesn't seem to work unless you explicitly set a new default. Doesn't work: hugepagesz=1G hugepages=25 grep Huge /proc/meminfo AnonHugePages: 464896 kB ShmemHugePages: 0 kB FileHugePages: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB Hugetlb: 26214400 kB However, if I put this in the append, it does work default_hugepagesz=1G hugepagesz=1G hugepages=25 grep Huge /proc/meminfo AnonHugePages: 131072 kB ShmemHugePages: 0 kB FileHugePages: 0 kB HugePages_Total: 25 HugePages_Free: 24 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 1048576 kB Hugetlb: 26214400 kB Wondering if that's a bug somewhere because I would think hugepagesz by itself should let you set the size to override the kernel default but it only appears to work if default_hugepagesz is present too.
March 12, 20251 yr Thanks for posting your workaround. I just had this same issue trying to setup 1G hugepages. After adding default_hugepagesz, the 1G pages allocated and I could boot my VMs using them
March 12, 20251 yr Author 18 minutes ago, Seebach said: Thanks for posting your workaround. I just had this same issue trying to setup 1G hugepages. After adding default_hugepagesz, the 1G pages allocated and I could boot my VMs using them Glad to hear it works for you. Curious if anyone from the Unraid team could comment on this. Minor bug but appears to be a bug nonetheless. Thanks
September 28, 2025Sep 28 That behavior is expected.Here’s what’s happening:hugepagesz= only defines which hugepage size(s) the kernel may allocate at boot.But if you don’t also set default_hugepagesz=1G, the kernel’s default pool remains 2 MB pages, which is what you saw in /proc/meminfo.When you just do hugepagesz=1G hugepages=25, the kernel parses it, but since the default is still 2 MB, it never actually creates the 1 GB pages. They end up ignored.That’s why your second attempt works:default_hugepagesz=1G hugepagesz=1G hugepages=25 That combination tells the kernel:Set the default hugepage size to 1 GB.Enable 1 GB pages.Allocate 25 of them.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.