Enable huge pages in lxc container

Jul 18, 2018
26
5
43
19
Hi,
how can I enable huge pages on container? Need setup for DBs.

lxc-container~# sysctl -w vm.nr_hugepages=102400
sysctl: setting key "vm.nr_hugepages", ignoring: Read-only file system

Thanks
 
Hi,
how can I enable huge pages on container? Need setup for DBs.

lxc-container~# sysctl -w vm.nr_hugepages=102400
sysctl: setting key "vm.nr_hugepages", ignoring: Read-only file system

Thanks

Were you able to get this working?

I was able to enable huge pages in an LXC container for PostGres, by setting vm.nr_hugepages on the proxmox host itself. I also disabled Transparent Huge Pages on the proxmox host, via grub cmdline options.

You can watch cat /proc/meminfo on host (shows identical reading out lxc) to monitor huge page allocation.
 
Were you able to get this working?

I was able to enable huge pages in an LXC container for PostGres, by setting vm.nr_hugepages on the proxmox host itself. I also disabled Transparent Huge Pages on the proxmox host, via grub cmdline options.

You can watch cat /proc/meminfo on host (shows identical reading out lxc) to monitor huge page allocation.
Hi, yes - I did exactly what you describe (file /etc/sysctl.conf on the Proxmox server itself)... Thanks
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!