Give memory unused for an hour back to the host

damon_reclaim pages out memory that hasn't been touched for an hour, whatever
memory is free, so virtio-balloon free page reporting can return it to the
host. The test VM in the README gets a balloon device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Job79andClaude Opus 5.5 committed 2026-11-14 22:43:54 +01:00
1 parent 92a21ae607
commit f3dfbb4f78
2 files changed
+9 -2

No files matched your search

+8 -1
View File
@@ -53,13 +53,20 @@ Locale=C.UTF-8
UnifiedKernelImageFormat=%i_%v
# The console on screen and serial port, the machine ID from the VM's firmware (/etc is read-only;
# mkosi.extra/etc/machine-id is empty, so no boot counts as the first), no systemd-firstboot
# questions (gitea-runner-setup asks its own), and KSPP hardening (the last four).
# questions (gitea-runner-setup asks its own), freeing memory unused for an hour (damon_reclaim, in
# µs; the watermarks make it run whatever memory is free), so the host can take it back
# (virtio-balloon free page reporting), and KSPP hardening (the last four).
KernelCommandLine=
console=tty0
console=ttyS0,115200n8
quiet
systemd.machine_id=firmware
systemd.firstboot=no
damon_reclaim.enabled=Y
damon_reclaim.min_age=3600000000
damon_reclaim.wmarks_high=1000
damon_reclaim.wmarks_mid=999
damon_reclaim.wmarks_low=0
slab_nomerge
init_on_alloc=1
randomize_kstack_offset=on