TECHNICAL GUIDE
Fabrics & Scaling · MEMORY DEDUPLICATION

Memory Deduplication

Run more VMs on the RAM you already own. STRATUM combines host Linux Kernel Samepage Merging (KSM) with live Compute Fabric telemetry and optional dedup-backed Memory Share Factor scheduling.

Share RAM. Pack the Rack. video thumbnail
WALKTHROUGH 29 / MEMORY DEDUPLICATION

Share RAM. Pack the Rack.

STRATUM Memory Deduplication turns duplicate VM memory into rack-scale capacity. Cut RAM consumption, unlock up to 2× VM memory density where savings allow, and run more workloads on the same physical servers. More VMs. Less RAM. Same hardware.

WATCH VIDEO
MORE WORKLOADS. SAME RAM.

What memory deduplication does

Memory deduplication lets VMs on the same host share identical memory pages, so the host uses less physical RAM than its VMs were given. This is key for rack-scale density and high-performance computing where many VMs share the same running applications and data. STRATUM VMs mark their memory as mergeable, and Kernel Samepage Merging (KSM) in the host's Linux kernel scans it in the background. When KSM finds identical pages (typically 4 KiB each on x86 hosts, with Arm64 memory deduplication also supported), it keeps one copy and shares it between every VM holding that page. Arm64 page size depends on host configuration.

A shared page is read-only, so a VM that writes to it first gets its own private copy through copy-on-write. VMs never see one another's writes and guests require no drivers or agents. Savings are greatest when VMs run the same operating system or template because system files, libraries, common services and zero-filled memory match.

Savings build gradually as KSM scans and can shrink when guests fill memory with different data. In one test, five 7.8 GiB VMs holding the same 4 GB of data used about 19 GiB of host memory, not 39 GiB. The result is workload-dependent, not a guaranteed compression ratio.

DEDUPLICATION AND SCHEDULING ARE TWO DIFFERENT THINGS.

KSM merges identical pages on every host where it runs. The Memory Share Factor only decides whether STRATUM uses those already-realized savings to place additional VMs.

COMPUTE FABRIC / LIVE TELEMETRY

Seeing the savings in Compute Fabric

Open Compute Fabric from the left rail and inspect each host's Memory bar under Fabric Hosts. STRATUM shows both the memory assigned to VMs and the memory the host is actually using.

  • Wide bar: memory allocated to VMs, which STRATUM reserves for them in full.
  • Thin line: memory actually in use on the host from its normal report. For example, 19 GiB in use · 39 GiB / 122 GiB allocated.
  • Memory Dedup: memory KSM saves after its own overhead, and the percentage of VM memory that represents. The display reads net overhead when KSM costs more than it saves, or telemetry stale when the host has not reported recently.

Hover over the Memory bar to see the host reserve and how much memory STRATUM can schedule there. The gap between the thin line and wide bar is memory saved by deduplication or memory the guests have not yet touched. It is not all immediately usable overcommit capacity.

FIGURE 01Compute Fabric Memory Deduplication
ADMINISTRATION / EXECUTION

Using the savings: Memory Share Factor

Open Administration → Execution and set Memory Share Factor, next to CPU Share Factor. Only administrators can change it. Raise this factor to let STRATUM place additional VMs on hosts where memory deduplication has already produced measurable savings.

A host's dedicated memory is physical RAM minus the host reserve. Its nominal VM allocation capacity is dedicated memory multiplied by the chosen factor:

SettingPlacement limitPolicy
1× Dedicated (default)1.00 × dedicated RAMEvery GiB allocated to a VM is backed by physical memory capacity.
1.25×1.25 × dedicated RAMAdditional placement subject to the dedup-backed guard, when enabled.
1.5×1.50 × dedicated RAMAdditional placement subject to the dedup-backed guard, when enabled.
2×2.00 × dedicated RAMAdditional placement subject to the dedup-backed guard, when enabled.

Dedup-backed only (recommended)

Dedup-backed only is on by default and greyed out at 1× because it has no effect there. Above 1×, STRATUM admits a VM beyond a host's dedicated memory only if all four amounts together still fit within dedicated memory:

  1. Memory currently in use on the host.
  2. Memory allocated to running VMs but not yet touched.
  3. The new VM at its full configured memory size.
  4. A buffer of 10% of the host's RAM.
USE SAVINGS THAT EXIST, NOT SAVINGS YOU HOPE TO GET.

STRATUM assumes no additional KSM savings will appear. A host without a fresh free-memory report gets no placement beyond 1×. As savings grow, VMs waiting for memory are placed automatically when all admission checks allow it.

Dedup-backed only off

With Dedup-backed only off, STRATUM may accept memory up to the selected factor whether or not deduplication has actually saved any RAM. The interface displays a warning. Use this only when you know your VMs will never consume all of their allocated memory simultaneously.

Changes apply immediately to new placements; running VMs are never stopped just because the factor changes. A host already above a lowered limit is marked over current capacity and takes no more VMs until usage falls. Every change is recorded in the Audit log.

RESOURCE PROTECTION

How STRATUM keeps hosts safe

Three safeguards protect every host, regardless of the Memory Share Factor.

  • Host reserve: keep the greater of 1 GiB or 5% of the host's RAM for Linux, VM overhead and KSM bookkeeping. On a 122 GiB host, that is about 6 GiB.
  • Low-memory guard: STRATUM does not start a VM if allocating its full size would leave less than 1 GiB actually free. VMs that are still starting count at their full size.
  • Out-of-memory protection: if Linux still runs out of memory, it stops a VM, selecting the largest first, rather than STRATUM services. The host and other VMs continue, and the stopped VM appears as failed in Compute Fabric.
OPERATING PRACTICE

Good practice

  • Start at 1× Dedicated and watch Memory Dedup under normal load, then consider 1.5× with Dedup-backed only on.
  • Where placement policy allows it, put VMs built from the same template on the same hosts so their memory pages are more likely to match.
  • GPU passthrough VMs are not deduplicated because their memory is pinned for the GPU; they continue to operate normally.
  • If a VM is waiting for memory, Compute Fabric explains why, including dedup savings too small or low free memory.
  • KSM shares identical pages across VMs on one host. Place tenants requiring strict memory separation on separate hosts or on hosts without KSM.
HOST VALIDATION / OPTIONAL

Check KSM from the Linux host

When diagnosing a host directly, Linux exposes KSM counters under /sys/kernel/mm/ksm/. This example estimates gross physical pages saved by sharing. It is not the same as STRATUM's net Memory Dedup figure, which accounts for KSM overhead.

shell · read host KSM shared pages
awk -v p="$(getconf PAGESIZE)" \
'{printf "KSM shared-page savings (gross): %.1f MiB\n", $1*p/1048576}' \
/sys/kernel/mm/ksm/pages_sharing