From: Peter Humphrey <peter@prh.myzen.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] How to compress lots of tarballs
Date: Mon, 27 Sep 2021 15:13:34 +0100 [thread overview]
Message-ID: <3138453.44csPzL39Z@wstn> (raw)
In-Reply-To: <4346990.LvFx2qVVIh@wstn>
On Monday, 27 September 2021 14:30:36 BST Peter Humphrey wrote:
> On Monday, 27 September 2021 02:39:19 BST Adam Carter wrote:
> > On Sun, Sep 26, 2021 at 8:57 PM Peter Humphrey
<peter@prh.myzen.co.uk>
> >
> > wrote:
> > > Hello list,
> > >
> > > I have an external USB-3 drive with various system backups. There are
> > > 350
> > > .tar files (not .tar.gz etc.), amounting to 2.5TB. I was sure I wouldn't
> > > need to compress them, so I didn't, but now I think I'm going to have
> > > to.
> > > Is there a reasonably efficient way to do this?
> >
> > find <mountpoint> -name \*tar -exec zstd -TN {} \;
> >
> > Where N is the number of cores you want to allocate. zstd -T0 (or just
> > zstdmt) if you want to use all the available cores. I use zstd for
> > everything now as it's as good as or better than all the others in the
> > general case.
> >
> > Parallel means it uses more than one core, so on a modern machine it is
> > much faster.
>
> Thanks to all who've helped. I can't avoid feeling, though, that the main
> bottleneck has been missed: that I have to read and write on a USB-3 drive.
> It's just taken 23 minutes to copy the current system backup from USB-3 to
> SATA SSD: 108GB in 8 .tar files.
I was premature. In contrast to the 23 minutes to copy the files from USB-3 to
internal SSD, zstd -T0 took 3:22 to compress them onto another internal SSD. I
watched /bin/top and didn't see more than 250% CPU (this is a 24-CPU box) with
next-to-nothing else running. The result was 65G of .tar.zst files.
So, at negligible cost in CPU load*, I can achieve a 40% saving in space. Of
course, I'll have to manage the process myself, and I still have to copy the
compressed files back to USB-3 - but then I am retired, so what else do I have
to do? :)
Thanks again, all who've helped.
* ...so I can continue running my 5 BOINC projects at the same time.
--
Regards,
Peter.
next prev parent reply other threads:[~2021-09-27 14:13 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-26 10:57 [gentoo-user] How to compress lots of tarballs Peter Humphrey
2021-09-26 11:36 ` Simon Thelen
[not found] ` <20210926113622.E8352E09BE@pigeon.gentoo.org>
2021-09-26 12:23 ` Ramon Fischer
2021-09-26 12:25 ` Ramon Fischer
2021-09-26 15:38 ` Peter Humphrey
2021-09-26 17:36 ` antlists
2021-09-28 17:45 ` Laurence Perkins
2021-09-27 1:39 ` Adam Carter
2021-09-27 13:30 ` Peter Humphrey
2021-09-27 14:13 ` Peter Humphrey [this message]
2021-09-28 17:43 ` Laurence Perkins
2021-09-29 8:27 ` Peter Humphrey
2021-09-29 15:37 ` Rich Freeman
2021-09-29 20:04 ` Dale
2021-09-29 20:27 ` Laurence Perkins
2021-09-29 20:58 ` Dale
2021-09-29 21:48 ` Wols Lists
2021-09-29 23:17 ` Rich Freeman
2021-09-30 17:19 ` antlists
2021-10-01 22:31 ` Frank Steinmetzger
2021-09-28 11:38 ` Rich Freeman
2021-09-28 13:02 ` Peter Humphrey
2021-09-28 11:19 ` Peter Humphrey
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=3138453.44csPzL39Z@wstn \
--to=peter@prh.myzen.co.uk \
--cc=gentoo-user@lists.gentoo.org \
/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