Resizing DRAM Tier for KVM

Resize the DRAM tier during runtime to balance performance with memory resource cost using the mvmcli dram resize command.

About this task

The starting DRAM tier is set in the application configuration file, but Memory Machine can also adjust the DRAM tier size dynamically on individual running workloads to optimize performance vs. DRAM consumption. You can effectively tune the performance of VMs while they are running.

Procedure

  1. Optional: If you plan to allocate HugePages, you must first configure HugePages on your host OS. See Configuring HugePages for instructions.
  2. Change the DRAM tier size as follows.
    # mvmcli dram resize -s new-size -p pid -g true|false
    where
    new-size
    Is the new DRAM tier size in MB.
    pid
    Is the process ID of the qemu-kvm process of the VM.
    -g
    Is used to turn HugePages on and off. Defaults to false.
    Important:

    To activate HugePages, you must first zero out the DRAM tier. This means you must first resize the DRAM to zero:

    # mvmcli dram resize -p pid -s 0 -g false
    Then set DRAM with HugePages on. For example:
    # mvmcli dram resize -p pid -s 2000 -g true