Skip to content

VM driver: guest page cache is never returned to the host #6028

Backlog

Description

@chiptoe-svg

On macOS (v0.1.10, vm driver), a VM's host memory stays near its peak after the agent goes idle. Free-page reporting returns freed guest memory, but the guest's file cache isn't free memory, so it is never reported. In our VMs that cache is about 480 MB after a browser session, on top of about 220 MB in use.

From inside the sandbox we can only drop it file by file (dd iflag=nocache), since drop_caches needs root. Doing that on idle took the cache from 946 MB to 72 MB, but macOS reclaims the freed pages lazily, so the host saving varied from none to 300 MB.

Could the supervisor, which runs as root, drop the guest's caches when a sandbox goes idle, or the driver offer a setting for it? Happy to test on macOS arm64.

Activity

  1. added
    state:triage-needed
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:triage-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions