Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Setting 1G Hugepages Requires Setting Default

Featured Replies

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.

  • 4 weeks later...
  • Author

bump

  • 3 weeks later...

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 

  • 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

  • 6 months later...

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:

  1. Set the default hugepage size to 1 GB.

  2. Enable 1 GB pages.

  3. 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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.