Configuring HugePages

Configure Linux HugePages for MVMAS DRAM caching by calculating how many HugePages your system needs and setting the vm.nr_hugepages kernel parameter to that value.

About this task

MVMAS uses 2MB translation lookaside buffer (TLB) pages to tier data between PMEM and DRAM. See The Application DRAM Tier. Default page size is 4 kB, which causes excessive page faulting in many memory-intensive applications.

To use HugePages, you must allocate a HugePages pool on the server.

Procedure

  1. Calculate the number of HugePages needed on your system. Since Memory Machine uses 2 MB HugePages, a system requires 500 HugePages for every one GB of DRAM to be used for TLB.
    If you plan to use all of the server's memory to run Memory Machine-managed applications, create enough HugePages for 90% of the server's DRAM. (The OS requires the remaining 10% of DRAM to run.) So for example if the system has 64 GB of DRAM, the system requires HugePages for 64 * 0.9 = 57.6 GB, so allocate 57.6 * 500 = 28800 HugePages.
  2. Use the sysctl command to set the vm.nr_hugepages kernel variable to the calculated number of HugePages. For example:
    # sysctl -w vm.nr_hugepages=28800
  3. To automatically set the HugePages at bootup (to avoid having to set HugePages after every restart), add the following line to the appropriate system control file (for example, /etc/sysctl.conf) for your server.
    vm.nr_hugepages=hugepage_count
    where hugepage_count is the number of HugePages that you calculated in step 1.