From: Stefan Reiter <s.reiter@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH 0/2] use async pxar encoder
Date: Tue, 9 Feb 2021 13:03:46 +0100 [thread overview]
Message-ID: <20210209120348.8359-1-s.reiter@proxmox.com> (raw)
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
next reply other threads:[~2021-02-09 12:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-09 12:03 Stefan Reiter [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210209120348.8359-1-s.reiter@proxmox.com \
--to=s.reiter@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox