Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

Investigate if the disk image can be further compressed sparisfied #54

Open
anjannath opened this issue Apr 8, 2019 · 5 comments
Open

Comments

@anjannath
Copy link
Member

maybe people have already tried this, the tar ball now is 2.6GB if we can compress the disk image and then further tar ball it, is there a chance to decrease the size?

http://libguestfs.org/virt-sparsify.1.html

cc @praveenkumar

@anjannath anjannath transferred this issue from crc-org/crc Apr 9, 2019
@cfergeau
Copy link

cfergeau commented Apr 9, 2019

I've just done this testing
Initial image: 3164378298 bytes
Image compressed with tar zcSf after running virt-sparsify: 2521593147 bytes (20% size reduction)
Image compressed with tar JcSf after running virt-sparsify: 1695649012 bytes (45% size reduction)

The xz compression of the last image took a really long time, I did not compare decompression times.

@anjannath
Copy link
Member Author

@cfergeau Do we have to expand the disk again after extracting the tar ball, or it can be used like that?

@cfergeau
Copy link

cfergeau commented Apr 9, 2019

Decompression times are comparable between the current tarball and the xz compressed one:

$ time gunzip -k ./crc_libvirt_0.16.1.tar.gz
real	1m40.757s

$ time xz -d -k ./crc_libvirt-sparse.tar.xz^C
real	1m53.299s

@cfergeau
Copy link

cfergeau commented Apr 9, 2019

@anjannath there is no additional step needed, you uncompress the tarball, and can use it as is.

@cfergeau
Copy link

I've now tested the image I got out of virt-sparsify, and did not notice any issues with it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants