Matthew Miller (mattdm(a)fedoraproject.org) said:
On Wed, May 15, 2013 at 11:18:04AM -0400, Matthew Miller wrote:
> > 2) I also commented out the "Zeroing out empty space" postinstall
stuff,
> > because it drastically increases the image build time for not much benefit,
> > IMHO.
> One time image build cost vs. whatever benefit multipled by every time the
> image is used. :)
To put some numbers behind it, the compressed qcow2 image with the dd to
zero empty space is 215M out of appliance-creator. Without it, it's 242M.
If we use a smaller blocksize, or an incrementally shrinking one, we can
shrink it by another megabyte, at the cost of even more build time. I think
that's probably across the worth-it threshold, though.
Using virt-sparsify seems to take even longer, but does get it down to 208M.
That requires libguestfs, which we can't do in the current build system, but
will be able to in the future one. (Feature rescheduled for F20.)
Why not use fstrim on the image file?
Bill