How to Optimize Memory Usage to Enhance Device & Virtual Machine Performance


Last modified date: 2020-07-01

Introduction

A lack of system memory affects both system & virtual machine performance (VM). To remedy this, Virtualization Station offers a Memory Optimizer feature that combines memory sharing and dynamic memory allocation to ensure memory usage on the device is used effectively. In this tutorial, we will explain how to optimize the memory usage to enhance flexibility and scalability for system and virtual machines.

Environment Setup

This tutorial uses the following hardware environment, but the steps should be largely identical regardless of your specific setup.

Device

Type

Host Device

TS-677-1600-8G

VM1

Windows 10 64-bit (4 cores / 4 GB)

VM2

Windows 10 64-bit (4 cores / 4 GB)

VM3

Ubuntu 18.04 64-bit (4 cores / 2 GB)

VM4

Ubuntu 18.04 64-bit (4 cores / 2 GB)

Preferences and Settings Configuration

Configuring Memory Overcommitment and Memory Optimizer

  1. Start Virtualization Station.
  2. Go to Preferences > Memory.
  3. Select Memory Overcommitment.
  4. Under Overcommitted Ratio, select 50%.
  5. Enable the Memory Optimizer.
    1. Select Enable Memory Optimizer.
    2. Select Automatic Optimization Adjustments.
      Note:

      Automatic Optimization Adjustments are usually recommended when optimizing memory usage.

      Customized Adjustments allow you to customize the scanning threshold and interval based on your specific needs.

  6. Click Apply.

Configuring Memory Sharing and Dynamic Memory Allocation

You must complete this process for each virtual machine.

  1. Start Virtualization Station.
  2. Identify a running VM.
  3. Shut down the VM.
  4. Go to VM Settings > General.
  5. Select Enable Memory Sharing.
  6. Select Enable Dynamic Memory Allocation.
  7. Configure the reserved memory setting.

    Reserved Memory is always allocated for the VM. The combined memory for every VM shouldn’t exceed the usable system memory.

    Important:

    Setting the Reserved Memory to less than the minimum required by the operating system may impact performance.

    Device

    Reserved Memory

    VM1

    2.0 GB

    VM2

    2.0 GB

    VM3

    1.2 GB (1229 MB)

    VM4

    1.2 GB (1229 MB)

  8. Configure the shares setting.

    The shares values (Low, Normal, High, & Custom) are compared between all virtual machines on the system. The higher the value of the VM, the more memory is allocated when the system has free memory available. Conversely, when the system is running low on memory, the proportion of memory requested from this VM will be lower.

    Device

    Shares

    VM1

    Low (1)

    VM2

    High (10000)

    VM3

    Low (1)

    VM4

    High (10000)

Installing the VirtIO Balloon Driver on Virtual Machines

Modern Linux-based virtual machines (VM3 & VM4) include the Balloon drivers by default. This process is only required for Windows-based virtual machines (VM1 & VM2).

  1. Start Virtualization Station.
  2. Identify a VM.
  3. Stop the VM.
  4. Go to VM Information.
  5. Insert the Guest Tools CD ISO file.
    1. Click .

      A menu opens.

    2. Select Insert Guest Tools CD.
  6. Start the VM.
  7. Click to open the VM console.
  8. Navigate to the CD Drive.
  9. Install qnap-guest-tools from the Guest Tools CD.
  10. Follow the on-screen instructions to install QNAP Guest Tools.

Configuring Auto Start

This step is optional, but may help reduce issues with insufficient memory during VM startup. Because Windows-based virtual machines use all allocated memory when starting, QNAP recommends starting these VMs first.

You must complete this process for each virtual machine.

  1. Start Virtualization Station.
  2. Identify a VM.
  3. Go to VM Settings > Others.
  4. Under Auto Start, select Delay.
  5. Configure the start delay.

    Device

    Start Delay

    VM1

    0 seconds

    VM2

    60 seconds

    VM3

    120 seconds

    VM4

    180 seconds

Review

Checking Memory Sharing

  1. Start Virtualization Station.
  2. Click .

Checking Dynamic Memory Allocation on Windows VMs

These directions only apply to Windows-based virtual machines.

  1. Start Virtualization Station.
  2. Identify a VM.
  3. Click to open the VM console.
  4. Install and launch RAMMap.
    Note:

    The Driver Locked field lists the amount of memory reclaimed from the VM when the host device is lacking memory.

Checking Dynamic Memory Allocation on Linux VMs

These directions only apply to Linux-based virtual machines.

  1. Start Virtualization Station.
  2. Identify a VM.
  3. Click to open the VM console.
  4. Launch the System Monitor.
    Note:

    The Total Memory field lists the total amount of usable memory available to the VM after any memory is reclaimed by the host device.

Was this article helpful?

69% of people think it helps.
Thank you for your feedback.

Please tell us how this article can be improved:

If you want to provide additional feedback, please include it below.

Choose specification

      Show more Less

      Choose Your Country or Region

      open menu
      back to top