[pbs-devel] [PATCH proxmox-backup 3/5] file-restore: increase RAM for ZFS and disable ARC
Stefan Reiter
s.reiter at proxmox.com
Wed Jun 16 12:55:50 CEST 2021
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 at proxmox.com>
---
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,
}
};
--
2.30.2
More information about the pbs-devel
mailing list