From: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
To: "Ted Ts'o" <tytso@mit.edu>
Cc: Carlos Maiolino <cmaiolino@redhat.com>,
Andreas Dilger <adilger@dilger.ca>,
linux-ext4@vger.kernel.org
Subject: Re: [PATCH] Add better example about how to compress e2image raw image
Date: Mon, 26 Sep 2011 14:22:28 +0200 [thread overview]
Message-ID: <4E806E84.4090106@itwm.fraunhofer.de> (raw)
In-Reply-To: <20110924163153.GB2779@thunk.org>
On 09/24/2011 06:31 PM, Ted Ts'o wrote:
> On Fri, Sep 23, 2011 at 05:51:24PM -0300, Carlos Maiolino wrote:
>> On Fri, Sep 23, 2011 at 02:24:23PM -0600, Andreas Dilger wrote:
>>> On 2011-09-23, at 12:47 PM, Carlos Maiolino wrote:
>>>> The current example in the man page uses bzip2 to compress
>>>> the raw image file created by the e2image, but, bzip2 does
>>>> not honors sparse files, which causes the image to have the
>>>> same size of the filesystem.
>>>> Using tar together with bzip2 will make the compressed file
>>>> to honor the sparsed file, which makes it more transportable
>>>> than the current one if the filesystem is large.
>
> The problem with using tar is that it requires extra disk space by the
> user --- somewhere a bit more than double the extra disk space
> (because you need to have space for the hda1.e2i file before it gets
> compressed). For very large file systems, this can be quite
> significant. My general philosophy has been to make things easy as
> possible for the users as being more important for the developers.
>
> For the developers, we do have contrib/make-sparse.c. All we have to do is:
>
> bunzip2< hda1.e2i.bz2 | make-sparse hda1.e2i
>
> ... and this creates a sparse file in hda1.e2i.
The problem is that the bzip2 run will take a huge amount of time to
compress all the zeros. In 2009 (with a recent CPU of that time) I
aborted such a run for a 8TiB file system after a couple of days, then
stored the e2image directly on disk and compressed it with tar and
sparse support, which finished after only 12 hours...
I don't think more modern CPUs are much faster for single threaded runs
as bzip2 does it.
So IMHO the man page should at least warn about that issue and suggest
to use a similar tar command.
Cheers,
Bernd
next prev parent reply other threads:[~2011-09-26 12:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-23 18:47 [PATCH] Add better example about how to compress e2image raw image Carlos Maiolino
2011-09-23 20:24 ` Andreas Dilger
2011-09-23 20:51 ` Carlos Maiolino
2011-09-24 16:31 ` Ted Ts'o
2011-09-26 12:13 ` Carlos Maiolino
2011-09-26 12:22 ` Bernd Schubert [this message]
2011-09-26 16:25 ` Eric Sandeen
2011-09-26 16:24 ` Eric Sandeen
2011-09-26 19:23 ` Ted Ts'o
2011-09-26 19:36 ` Carlos Maiolino
2011-09-26 20:01 ` Amir Goldstein
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=4E806E84.4090106@itwm.fraunhofer.de \
--to=bernd.schubert@itwm.fraunhofer.de \
--cc=adilger@dilger.ca \
--cc=cmaiolino@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).