You are not logged in.

#1 2019-10-10 18:46:42

ratcheer
Member
Registered: 2011-10-09
Posts: 675

[Solved] Confused about dracut image compression

I am switching from mkinitcpio to dracut. It is working well, but I have some confusion about the image compression.

With mkinitcpio, my generated image was less than 10 MB. With dracut and no compression, it is around 15 MB. But with dracut and lz4 compression, it is a little larger than 17 MB, which seems counterintuitive. Should I be using a different compression method? I chose lz4 because it is what is used in the example on the proposed Wiki page.

Here is my dracut conf file (without compression specified):

hostonly="yes"
omit_dracutmodules+=" luks lvm md dm multipath"

Last edited by ratcheer (2019-10-10 21:20:25)

Offline

#2 2019-10-10 19:16:35

ratcheer
Member
Registered: 2011-10-09
Posts: 675

Re: [Solved] Confused about dracut image compression

Ok, on reading the document more closely, I see that the default is to compress with gzip. So, I suppose this means that with my image, gzip is giving better compression than lz4.

Offline

#3 2019-10-10 19:50:20

progandy
Member
Registered: 2012-05-17
Posts: 3,535

Re: [Solved] Confused about dracut image compression

Normally lz4 compression produces larger files than gzip. On the other hand, decompression is much faster.

https://events.static.linuxfound.org/si … 3_klee.pdf
https://lists.ubuntu.com/archives/ubunt … 40726.html

Last edited by progandy (2019-10-10 19:52:09)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2019-10-10 20:12:19

ratcheer
Member
Registered: 2011-10-09
Posts: 675

Re: [Solved] Confused about dracut image compression

Thanks, @progandy. I've gone back to lz4.

Last edited by ratcheer (2019-10-10 21:21:08)

Offline

Board footer

Powered by FluxBB