[PATCH v1] mtd-utils:mkfs.ubifs: Add support for LZ4HC compression

Konstantin Tokarev annulen at yandex.ru
Mon Oct 21 02:49:57 PDT 2013



07.10.2013, 22:59, "Elie De Brauwer" <eliedebrauwer at gmail.com>:
> All,
>
> After some more experimentation and some input from Konstantin
> attached is a new version of a patch to mtd-utils which adds LZ4HC
> support to mkfs.ubifs:
>
> What's new:
>  - favor_lz4hc is changed to toggle between lz4hc/lzo rather than
> lz4hc/zlib in order to come up with a mode which should be both flash
> and cpu friendly, mainly since our experiments showed that lz4hc isn't
> a free lunch by default (read: probably starts paying of at larger
> block lengths than what we can offer it now).
>
> Some tests of this new mode at different favor-percents shows that for
> my little rootfs that with a favor percent of 10%, lz4hc gets used in
> about 17% of the cases with a footprint which is within a meg's range
> of what lzo would've done to it.
>
> edb at lapelidb:~/mtd-utils$ for x in 20 15 10 7 5 3; do  echo $x; sudo
> mkfs.ubifs/mkfs.ubifs  -X $x -x favor_lz4hc -m 2048 -e 126976 -c 744
> -d /tmp/k/ /tmp/imag.favor_lz4hc_$x | sort | uniq -c; ls -hal
> /tmp/imag.favor_lz4hc_$x ; done

Side note: there is no need to run mkfs.ubifs under root. Just add
/usr/sbin or /usr/local/sbin to your path.

-- 
Regards,
Konstantin



More information about the linux-mtd mailing list