Skip to content

docs: explain why krunkit's footprint overstates its memory use on macOS - #123

Open
JartX wants to merge 1 commit into
libkrun:mainfrom
JartX:docs-memory-accounting
Open

JartX wants to merge 1 commit into
libkrun:mainfrom
JartX:docs-memory-accounting

Conversation

@JartX

@JartX JartX commented Oct 26, 2026

Copy link
Copy Markdown

Adds a short section to docs/usage.md on measuring krunkit's memory use on macOS.

Activity Monitor's "Memory" column shows krunkit's physical footprint, and macOS counts a page of guest memory there twice when krunkit writes it and the guest then uses it: disk reads, received packets, virtio-fs reads, and the kernel at boot. After a guest reads a 600 MiB file, krunkit's footprint grows by about 1.2 GiB. The section explains this and points to system-wide numbers instead.

Details and a reproducer without libkrun are in libkrun/libkrun#947.

Activity Monitor shows krunkit's physical footprint, and macOS counts a
page of guest memory there twice when krunkit writes it and the guest
then uses it: disk reads, received packets, virtio-fs reads, and the
kernel and initramfs at boot. After a guest reads a 600 MiB file, the
footprint grows by about 1.2 GiB.

Add a section to docs/usage.md that explains this and points to the
system-wide numbers, which show what a VM really costs the host.

Assisted-by: Claude Code / claude-opus-5.5
Signed-off-by: JartX <sagformas@epdcenter.es>
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