aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <sebastian@breakpoint.cc>2019-06-01 12:43:23 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-01 19:38:44 +0200
commite5530fea6a3e094e83303749c20622f0af12f21f (patch)
treeda136c9e8a6d9f132d040eaae667c54f91094011 /configure.ac
parent51d8c731a20a6fbb1f746a166a85a07a7063d0e8 (diff)
mkfs.ubifs: Add ZSTD compression
I added ZSTD support to mkfs.ubifs and compared the ZSTD results with zlib/lzo and the available ZSTD compression levels. The results are in the following table: Comp image MiB time image2 MiB time none 271 0m 0,723s 223 0m 0,589s lzo 164 0m13,705s 116 0m11,636s zlib 150 0m 7,654s 103 0m 6,347s favor-lzo 158 0m21,137s 110 0m17,764s zstd-01 154 0m 1,607s 106 0m 1,429s zstd-02 153 0m 1,704s 105 0m 1,479s zstd-03* 152 0m 1,888s 104 0m 1,668s zstd-04 151 0m 2,741s 103 0m 2,391s zstd-05 150 0m 3,257s 102 0m 2,916s zstd-06 150 0m 3,735s 102 0m 3,356s zstd-07 150 0m 4,066s 102 0m 3,705s zstd-08 152 0m 1,857s 104 0m 1,644s zstd-09 152 0m 1,855s 104 0m 1,639s zstd-10 150 0m 6,654s 102 0m 6,195s zstd-11 150 0m10,027s 102 0m 9,130s zstd-12 149 0m14,724s 101 0m13,415s zstd-13 148 0m18,232s 100 0m16,719s zstd-14 148 0m20,859s 100 0m19,554s zstd-15 148 0m25,033s 100 0m23,186s zstd-16 148 0m38,837s 100 0m36,543s zstd-17 148 0m46,051s 100 0m43,120s zstd-18 148 0m49,157s 100 0m45,807s zstd-19 148 0m49,421s 100 0m45,951s zstd-20 148 0m51,271s 100 0m48,030s zstd-21 148 0m51,015s 100 0m48,676s zstd-22 148 0m52,575s 100 0m50,013s The UBIFS image was created via mkfs.ubifs -x $Comp -m 512 -e 128KiB -c 2200 -r $image $out I used "debootstrap sid" to create a basic RFS and the results are in the `image' column. The image2 column denotes the results for the same image but with .deb files removed. The time column contains the output of the run time of the command. ZSTD's compression level three is currently default. Based on the compression results (for the default level) it outperforms LZO in run time and compression and is almost as good as ZLIB in terms of compression but quicker. The higher compression levels make almost no difference in compression but take a lot of time. The compression level used is the default offered by ZSTD. It does not make sense the higher levels. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 1f862ec..b64841c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,6 +66,7 @@ need_pthread="no"
need_uuid="no"
need_zlib="no"
need_lzo="no"
+need_zstd="no"
need_xattr="no"
need_cmocka="no"
need_selinux="no"
@@ -138,6 +139,7 @@ AM_COND_IF([BUILD_UBIFS], [
need_xattr="yes"
need_zlib="yes"
need_lzo="yes"
+ need_zstd="yes"
need_openssl="yes"
])
@@ -164,6 +166,14 @@ AC_ARG_WITH([lzo],
*) AC_MSG_ERROR([bad value ${withval} for --without-lzo]) ;;
esac])
+AC_ARG_WITH([zstd],
+ [AS_HELP_STRING([--without-zstd], [Disable support for ZSTD compression])],
+ [case "${withval}" in
+ yes) ;;
+ no) need_zstd="no" ;;
+ *) AC_MSG_ERROR([bad value ${withval} for --without-zstd]) ;;
+ esac])
+
AC_ARG_WITH([selinux],
[AS_HELP_STRING([--with-selinux],
[Enable support for selinux extended attributes])],
@@ -189,6 +199,7 @@ pthread_missing="no"
uuid_missing="no"
zlib_missing="no"
lzo_missing="no"
+zstd_missing="no"
xattr_missing="no"
cmocka_missing="no"
selinux_missing="no"
@@ -225,6 +236,10 @@ if test "x$need_lzo" = "xyes"; then
)
fi
+if test "x$need_zstd" = "xyes"; then
+ PKG_CHECK_MODULES([ZSTD], [libzstd],, zstd_missing="yes")
+fi
+
if test "x$need_xattr" = "xyes"; then
AC_CHECK_HEADERS([sys/xattr.h], [], [xattr_missing="yes"])
AC_CHECK_HEADERS([sys/acl.h], [], [xattr_missing="yes"])
@@ -283,6 +298,13 @@ if test "x$lzo_missing" = "xyes"; then
dep_missing="yes"
fi
+if test "x$zstd_missing" = "xyes"; then
+ AC_MSG_WARN([cannot find ZSTD library required for mkfs program])
+ AC_MSG_NOTICE([mtd-utils can optionally be built without mkfs.ubifs])
+ AC_MSG_NOTICE([mtd-utils can optionally be built without ZSTD support])
+ dep_missing="yes"
+fi
+
if test "x$xattr_missing" = "xyes"; then
AC_MSG_WARN([cannot find headers for extended attributes])
AC_MSG_WARN([disabling XATTR support])
@@ -314,6 +336,7 @@ fi
##### generate output #####
AM_CONDITIONAL([WITHOUT_LZO], [test "x$need_lzo" != "xyes"])
+AM_CONDITIONAL([WITHOUT_ZSTD], [test "x$need_zstd" != "xyes"])
AM_CONDITIONAL([WITHOUT_XATTR], [test "x$need_xattr" != "xyes"])
AM_CONDITIONAL([WITH_SELINUX], [test "x$need_selinux" == "xyes"])
AM_CONDITIONAL([WITH_CRYPTO], [test "x$need_openssl" == "xyes"])