View previous topic :: View next topic |
Author |
Message |
paintchip n00b
Joined: 02 Jan 2010 Posts: 58
|
Posted: Thu Jul 15, 2021 3:08 pm Post subject: Hugepages |
|
|
Hey all,
I went through a lot of trouble trying to get hugepages to be 1G and now I'm wondering if I did it correctly. I only ask because everything was already working normally in my Mint install, but I had to modify GRUB_CMDLINE_LINUX_DEFAULT="default_hugepagesz=1G hugepagesz=1G hugepages = 4" in /etc/default/grub in order to get it to work on Gentoo. Is there a better way to set these defaults on boot so that they won't also affect my Mint installation? Also, do those defaults seem okay/normal? I've got 16GB or RAM.
Some of my steps:
I've turned on all of the hugepages options I could find in the kernel
Set GRUB_CMDLINE_LINUX_DEFAULT="default_hugepagesz=1G hugepagesz=1G hugepages = 4" (and remade crug.cfg + restarted)
Verified that pageizes is 1048576 kB with cat /proc/meminfo | grep Huge
Verified that my program could use the new hugepages.
Resources:
https://www.reddit.com/r/Gentoo/comments/o4b67d/how_to_enable_huge_pages/
https://help.ubuntu.com/community/KVM%20-%20Using%20Hugepages
https://www.golinuxcloud.com/change-default-hugepage-size-cpu-support-rhel/ |
|
Back to top |
|
|
mrbassie l33t
Joined: 31 May 2013 Posts: 832 Location: Go past the sign for cope, right at the sign for seethe. If you see the target you've missed it.
|
Posted: Sat Jul 17, 2021 9:20 am Post subject: Re: Hugepages |
|
|
paintchip wrote: | Hey all,
I had to modify GRUB_CMDLINE_LINUX_DEFAULT="default_hugepagesz=1G hugepagesz=1G hugepages = 4" in /etc/default/grub in order to get it to work on Gentoo. Is there a better way to set these defaults on boot so that they won't also affect my Mint installation? Also, do those defaults seem okay/normal? I've got 16GB or RAM. |
Have a look at the kvm page in the arch wiki, they use a sysctl. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|