You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
VM driver: guest page cache is never returned to the host #6028
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