How to enable Hugepages

How to enable Hugepages

Enabling Hugepages for Cozystack can be done both on initial installation and at any time after it. Applying this configuration after installation will require a full node reboot.

Read more in the Linux Kernel documentation: HugeTLB Pages.

Using Talm

Requires Talm v0.16.0 or later.

  1. Add the following lines to values.yaml:

    ...
    certSANs: []
    nr_hugepages: 3000
    

    vm.nr_hugepages is the count of pages per 2Mi.

  2. Apply the configuration:

    talm apply -f nodes/node0.yaml
    
  3. Finally, reboot the nodes:

    talm -f nodes/node0.yaml reboot
    

Using talosctl

  1. Add the following lines to your node template:

    machine:
      sysctls:
        vm.nr_hugepages: "3000"
    

    vm.nr_hugepages is the count of pages per 2Mi.

  2. Apply the configuration:

    talosctl apply -f nodetemplate.yaml -n 192.168.123.11 -e 192.168.123.11
    
  3. Reboot the nodes:

    talosctl reboot -n 192.168.123.11 -e 192.168.123.11