*Solved* Unraid Enabling Hugepages / 512GB RAM


Recommended Posts

I'm running supermicro SYS-4029GP-TRT2 dual cpu system with 512GB ram and it runs around 32 virtual machines and have been dealing with random sluggish performance, i'm assuming that this due to transparent pages? Things work fine when I step down to around 32GB ram and turn off some of the VM's.

 

Each cpu is a E5-2699 V4 @ 22 cores so 44 total for the system

Each VM is running with 16GB and 1 vcpu and its correct hyper thread

 

Is there a way to turn on or enable huge pages or does it require a custom kernel build? Currently running

Unraid 6.8.2 Stable and 6.5.1 Stable

 

Experiencing this exact issue from this linus video but the correction and fix was provided by the unraid team and doesn't appear to be available publicly?

https://youtu.be/1yFQd4MaKK0?t=554

 

Here’s a pic for anyone interested in my build project

 

w8orcKE.jpg


Replaced this one

O2ia9Xf.jpg

 

Thanks!

Edited by Magicmissle
Link to comment
13 minutes ago, testdasi said:

How much RAM would you need to start seeing benefits of huge pages?

Can't really answer that question.  It's not about quantity as much as its about use-case and applications.  I've never needed hugepages for any of my VMs because I'm not running databases, video encoding, etc.  The benefits of hugepages are pretty app-specific.  Linus saw the benefit specifically in a video he did where it featured a lot of video encoding being done and there was a pretty dramatic impact to overall performance as a result.

16 minutes ago, testdasi said:

What happens if my hugepage total doesn't match my VM RAM allocation?

Then your VM will give you an error upon trying to start it.

 

What is important to remember is that to change your allocation for hugepages, you need to adjust the lines in SysLinux and reboot.  There are technically methods that allow you to do this while the machine is running, but I highly advise against that as you may not get contiguous memory allocation then.

  • Thanks 1
Link to comment
9 hours ago, jonp said:

Can't really answer that question.  It's not about quantity as much as its about use-case and applications.  I've never needed hugepages for any of my VMs because I'm not running databases, video encoding, etc.  The benefits of hugepages are pretty app-specific.  Linus saw the benefit specifically in a video he did where it featured a lot of video encoding being done and there was a pretty dramatic impact to overall performance as a result.

Then your VM will give you an error upon trying to start it.

 

What is important to remember is that to change your allocation for hugepages, you need to adjust the lines in SysLinux and reboot.  There are technically methods that allow you to do this while the machine is running, but I highly advise against that as you may not get contiguous memory allocation then.

Thank you for the great information! I thought it was something deeper like a kernel option during compiling or something, I didn’t realize it was enabled already right out of the box!

 

Is there any specific documentation about hugepages and VM tuning? Is it specific to OVMF or seabios, etc?

Edited by Magicmissle
Link to comment
  • 3 months later...

Thanks for the info!

 

For anyone stumbling on this, be careful that apparently docker containers will use hugepages if available, so you might need to allocate some extra space for them when enabling hugepages on Main > Flash Device Settings. Didn't find a way to control this behavior though, so suggestions are welcome!

 

I also limited the memory in each docker container with:

--memory=2G

 

I found out about this the hard way, because my Win10 VM was failing to start with error:

qemu-system-x86_64: unable to map backing store for guest RAM: Cannot allocate memory hugepages

despite having allocated both 16G on syslinux and VM memory definition.

 

Hope this helps!

Link to comment
  • 3 years later...
On 5/29/2020 at 8:04 PM, apneves said:

Thanks for the info!

 

For anyone stumbling on this, be careful that apparently docker containers will use hugepages if available, so you might need to allocate some extra space for them when enabling hugepages on Main > Flash Device Settings. Didn't find a way to control this behavior though, so suggestions are welcome!

 

I also limited the memory in each docker container with:

--memory=2G 

 

I found out about this the hard way, because my Win10 VM was failing to start with error:

qemu-system-x86_64: невозможно отобразить резервное хранилище для гостевой оперативной памяти: невозможно выделить огромные страницы памяти 

despite having allocated both 16G on syslinux and VM memory definition.

 

Hope this helps!

I noticed that my UnraidOS began to consume more RAM than I allocated to them, so the one that was 32GB did not start

Edited by igorekDE
Link to comment

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.