From 8d72c2c32e6ae8292770fb0181cc9e2824e2ccc3 Mon Sep 17 00:00:00 2001 From: Stefan Reiter Date: Wed, 16 Jun 2021 12:55:50 +0200 Subject: [PATCH] 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 --- src/bin/proxmox_file_restore/qemu_helper.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/bin/proxmox_file_restore/qemu_helper.rs b/src/bin/proxmox_file_restore/qemu_helper.rs index c9d816ca..64d8e909 100644 --- a/src/bin/proxmox_file_restore/qemu_helper.rs +++ b/src/bin/proxmox_file_restore/qemu_helper.rs @@ -188,11 +188,10 @@ pub async fn start_vm( "-initrd", &ramfs_path, "-append", - if debug { - "debug panic=1" - } else { - "quiet panic=1" - }, + &format!( + "{} panic=1 zfs_arc_min=0 zfs_arc_max=0", + if debug { "debug" } else { "quiet" } + ), "-daemonize", "-pidfile", &format!("/dev/fd/{}", pid_fd.as_raw_fd()), @@ -240,9 +239,9 @@ pub async fn start_vm( } else { // add more RAM if many drives are given match id { - f if f < 10 => 128, - f if f < 20 => 192, - _ => 256, + f if f < 10 => 192, + f if f < 20 => 256, + _ => 384, } };