Bug#867539: live-build: nicer mksquashfs
Package: live-build
Version: 1:20170609
Severity: normal
Tags: patch
I am building somewhat larger Debian Live based systems in a tmpfs. Even
though the machines are quite powerful they become unresponsive to the
point of being completely unusable during the mksquashfs step.
Attached is a patch that fixes this problem by running mksquashfs with
"nice". I tested it on many machines for several weeks now and
everything kept running smoothly.
Cheers
Ronny
diff --git a/scripts/build/binary_rootfs b/scripts/build/binary_rootfs
index 6c797acb3..d50cf3b43 100755
--- a/scripts/build/binary_rootfs
+++ b/scripts/build/binary_rootfs
@@ -352,7 +352,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
fi
# Create image
- Chroot chroot "mksquashfs chroot filesystem.squashfs ${MKSQUASHFS_OPTIONS}"
+ Chroot chroot "nice -n 19 mksquashfs chroot filesystem.squashfs ${MKSQUASHFS_OPTIONS}"
rm -f chroot/chroot/excludes
@@ -413,7 +413,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -wildcards -ef config/rootfs/excludes"
fi
- mksquashfs chroot binary/${INITFS}/filesystem.squashfs ${MKSQUASHFS_OPTIONS}
+ nice -n 19 mksquashfs chroot binary/${INITFS}/filesystem.squashfs ${MKSQUASHFS_OPTIONS}
du -B 1 -s chroot | cut -f1 > binary/${INITFS}/filesystem.size
;;
Reply to: