Skip to content

host: switch snapshot mapping to PAGE_READONLY (PR #1373) - #7

Merged
danbugs merged 2 commits into
mainfrom
windows-test
May 10, 2026
Merged

host: switch snapshot mapping to PAGE_READONLY (PR #1373)#7
danbugs merged 2 commits into
mainfrom
windows-test

Conversation

@danbugs

@danbugs danbugs commented May 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Switches the hyperlight-host dependency from the snapshot-to-disk branch (which used PAGE_WRITECOPY / FILE_MAP_COPY from PR #1391) to disk_snapshot_copy (PR #1373's PAGE_READONLY / FILE_MAP_READ approach)
  • Adapts from_snapshot_file_with to the updated MultiUseSandbox::from_snapshot API which now requires HostFunctions and an optional SandboxConfiguration

This eliminates the Windows commit-charge problem where each VM reserved ~2.5 GB of virtual commit for the CoW mapping. With PAGE_READONLY, CoW is handled at the hypervisor level (SLAT/EPT) rather than the host OS level, so Windows does not reserve commit charge per VM.

Before: ~2535 MB commit per VM, max 5-6 VMs on 16 GB machine
After: 6 MB private per VM, 10 VMs verified at 59 MB total

danbugs added 2 commits May 10, 2026 06:17
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
@danbugs
danbugs merged commit 2814d15 into main May 10, 2026
68 checks passed
@danbugs
danbugs deleted the windows-test branch May 12, 2026 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant