public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH 0/2] use async pxar encoder
@ 2021-02-09 12:03 Stefan Reiter
  2021-02-09 12:03 ` [pbs-devel] [PATCH pxar 1/2] make aio::Encoder actually behave with async Stefan Reiter
  2021-02-09 12:03 ` [pbs-devel] [PATCH proxmox-backup 2/2] asyncify pxar create_archive Stefan Reiter
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Reiter @ 2021-02-09 12:03 UTC (permalink / raw)
  To: pbs-devel

No change in functionality intended for these two patches, but they will be
needed for my upcoming file-restore series. (or, well, they avoid doing the same
sync-but-in-thread style we follow in PxarBackupStream right now)

Changes the pxar archive creation code to fully embracy async/await and the
aio::Encoder from the pxar crate. Requires some changes in both crates, to
ensure 'SeqWrite + Send' is properly supported.

Testing and benchmarking showed no real difference in behaviour, except for a
very slight slowdown when backing up a folder with many smaller files (I tested
on my local QEMU repo, that's 11.2 GiB of git indices and data/code files atm).
This may be attributable to the introduced Mutex locking, or async/await
overhead - or just a fluke on my machine. 17s without, 19s with the patches.

Folders with fewer, but bigger files are unaffected.

Certainly learned a lot of Rust from this :) Lifetimes are still hard to follow
IMHO, especially with async... Feedback is appreciated of course, if there's
anything that can be done better.


pxar: Stefan Reiter (1):
  make aio::Encoder actually behave with async

 src/encoder/aio.rs  |  48 ++++++++---------
 src/encoder/mod.rs  | 128 +++++++++++++++++++++++---------------------
 src/encoder/sync.rs |  28 ++++------
 3 files changed, 101 insertions(+), 103 deletions(-)

proxmox-backup: Stefan Reiter (1):
  asyncify pxar create_archive

 src/bin/pxar.rs                  |   6 +-
 src/client/pxar_backup_stream.rs |  65 +++++-----
 src/pxar/create.rs               | 207 ++++++++++++++++---------------
 tests/catar.rs                   |   5 +-
 4 files changed, 143 insertions(+), 140 deletions(-)

-- 
2.20.1




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

end of thread, other threads:[~2021-02-17  9:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 12:03 [pbs-devel] [PATCH 0/2] use async pxar encoder Stefan Reiter
2021-02-09 12:03 ` [pbs-devel] [PATCH pxar 1/2] make aio::Encoder actually behave with async Stefan Reiter
2021-02-09 14:20   ` Wolfgang Bumiller
2021-02-17  8:53   ` [pbs-devel] applied: " Wolfgang Bumiller
2021-02-09 12:03 ` [pbs-devel] [PATCH proxmox-backup 2/2] asyncify pxar create_archive Stefan Reiter
2021-02-17  9:02   ` [pbs-devel] applied: " Wolfgang Bumiller

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