public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [RFC PATCH backup-restore-image/proxmox-backup] improve file-restore for zpools
@ 2022-10-31 11:39 Dominik Csapak
  2022-10-31 11:39 ` [pbs-devel] [RFC PATCH backup-restore-image 1/1] add kernel config options for memory hotplug Dominik Csapak
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Dominik Csapak @ 2022-10-31 11:39 UTC (permalink / raw)
  To: pbs-devel

when using file-restore for guests with a zpool, the minimal memory
amount given (up to 384 MiB depending on the disks) is often not enough,
resulting in an oom kill of our restore daemon inside the vm

the easiest way to trigger that is having many subvolumes in the pool
(e.g. i could trigger it easily with ~100 subvolumes)

to improve this, we dynamically add more (1GiB) when we see that the
client tries to access a zpool

with this, i successfully tested up to 1000 subvolumes (altough it took
a few minutes to mount, not exactly sure why)

for this to work, we have to adapt our custom kernel config a bit, so
that we include the memory hotplug configs

RFC because:
* not sure if the value of 1GiB is sensible, i tried to give some amount
  that is not too much, but should fix a wide range of cases
  maybe we want to make that configurable? if we do, maybe we should
  discard this approach and simply make the general amount of memory
  configurable?
* not sure about the hotplug mechanism, we could use virtio-mem instead,
  but in the current case i don't see any advantages
  (we have to predefine the maximum value anyway, and since we only
  have a few points where we update the memory, we don't need to do it
  in small increments, it also would require more kernel config flags)
* i mostly ignore the QMP answers from qemu because they are mostly
  empty and hold no real information. we could of course build a
  complete qmp client in rust (i guess we need that sooner or later
  anyway) but depending on how exactly we want to parse qemu messages
  this will increase the amount of work significantly

Note that when we want to bump the file-restore package, we still need
to apply my previous patches for pve-common/storage [0]

patch 1/2 of proxmox-backup is a simple cleanup that could be applied
individually

0: https://lists.proxmox.com/pipermail/pve-devel/2022-May/053085.html

proxmox-backup-restore-image:

Dominik Csapak (1):
  add kernel config options for memory hotplug

 src/config-base | 6 ++++++
 1 file changed, 6 insertions(+)

proxmox-backup:

Dominik Csapak (2):
  file-restore: fix deprecated qemu parameters
  file-restore: dynamically increase memory of vm for zpools

 proxmox-file-restore/src/block_driver_qemu.rs | 45 +++++++++--
 proxmox-file-restore/src/qemu_helper.rs       | 74 ++++++++++++++++++-
 2 files changed, 108 insertions(+), 11 deletions(-)

-- 
2.30.2





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-11-08 10:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31 11:39 [pbs-devel] [RFC PATCH backup-restore-image/proxmox-backup] improve file-restore for zpools Dominik Csapak
2022-10-31 11:39 ` [pbs-devel] [RFC PATCH backup-restore-image 1/1] add kernel config options for memory hotplug Dominik Csapak
2022-11-07 12:48   ` [pbs-devel] applied: " Wolfgang Bumiller
2022-10-31 11:39 ` [pbs-devel] [PATCH proxmox-backup 1/2] file-restore: fix deprecated qemu parameters Dominik Csapak
2022-11-04 12:29   ` [pbs-devel] applied: " Wolfgang Bumiller
2022-10-31 11:39 ` [pbs-devel] [RFC PATCH proxmox-backup 2/2] file-restore: dynamically increase memory of vm for zpools Dominik Csapak
2022-11-07 12:35   ` [pbs-devel] applied: " Wolfgang Bumiller
2022-11-07 17:15     ` Thomas Lamprecht
2022-11-08  7:59       ` Dominik Csapak
2022-11-08  9:19         ` Thomas Lamprecht
2022-11-08 10:07           ` Dominik Csapak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal