file-restore: increase RAM for ZFS and disable ARC

Even through best efforts at keeping it small, including the ZFS tools
in the initramfs seems to have exhausted the small overhead we had left
- give it a bit more RAM to compensate.

Also disable the ZFS ARC, as it's no use in such a memory constrained
environment, and we cache on the QEMU/rust layer anyway.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
Stefan Reiter 2021-06-16 12:55:50 +02:00 committed by Thomas Lamprecht
parent c48c38ab8c
commit 8d72c2c32e
1 changed files with 7 additions and 8 deletions

View File

@ -188,11 +188,10 @@ pub async fn start_vm(
"-initrd", "-initrd",
&ramfs_path, &ramfs_path,
"-append", "-append",
if debug { &format!(
"debug panic=1" "{} panic=1 zfs_arc_min=0 zfs_arc_max=0",
} else { if debug { "debug" } else { "quiet" }
"quiet panic=1" ),
},
"-daemonize", "-daemonize",
"-pidfile", "-pidfile",
&format!("/dev/fd/{}", pid_fd.as_raw_fd()), &format!("/dev/fd/{}", pid_fd.as_raw_fd()),
@ -240,9 +239,9 @@ pub async fn start_vm(
} else { } else {
// add more RAM if many drives are given // add more RAM if many drives are given
match id { match id {
f if f < 10 => 128, f if f < 10 => 192,
f if f < 20 => 192, f if f < 20 => 256,
_ => 256, _ => 384,
} }
}; };