public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [RFC 0/2] Add job transaction support for backup
@ 2020-08-20 13:48 Stefan Reiter
  2020-08-20 13:48 ` [pve-devel] [RFC qemu 1/2] PVE: Add sequential job transaction support Stefan Reiter
  2020-08-20 13:48 ` [pve-devel] [RFC qemu 2/2] PVE-Backup: Use a transaction to synchronize job states Stefan Reiter
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Reiter @ 2020-08-20 13:48 UTC (permalink / raw)
  To: pve-devel

RFC since very experimental and only lightly tested.

Our backup starts one QEMU block job per drive that is included in the final
archive. Currently, we start them all in 'paused' state, manually calling
job_start for the next one we whenever one calls its completion callback.

By using a transaction, we can automate that part, meaning we need a lot less
code in pve-backup.c. Additionally, we gain the benefit of having transactional
backups, which is important for dirty-bitmaps, since it allows us to keep all
bitmaps even when a backup fails or is aborted. QEMU does the heavy lifting
here, by already having support for transactions in backup jobs and handling the
bitmaps accordingly.

A small change to the job transaction API of QEMU is necessary (patch 1) to
allow the jobs to run in sequence, instead of all at once. This property is good
to have for several reasons, like not overloading a server, writing VMA files in
sequential order and supporting bandwidth limiting (which only works per job in
QEMU).


qemu: Stefan Reiter (2):
  PVE: Add sequential job transaction support
  PVE-Backup: Use a transaction to synchronize job states

 include/qemu/job.h |  12 ++++
 job.c              |  24 +++++++
 pve-backup.c       | 169 ++++++++++++++-------------------------------
 3 files changed, 86 insertions(+), 119 deletions(-)

-- 
2.20.1




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

end of thread, other threads:[~2020-08-20 13:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-20 13:48 [pve-devel] [RFC 0/2] Add job transaction support for backup Stefan Reiter
2020-08-20 13:48 ` [pve-devel] [RFC qemu 1/2] PVE: Add sequential job transaction support Stefan Reiter
2020-08-20 13:48 ` [pve-devel] [RFC qemu 2/2] PVE-Backup: Use a transaction to synchronize job states Stefan Reiter

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