Speedup Whonix 11 build time

Information

ID: 295
PHID: PHID-TASK-3swcvgblkgrn5iwj5c6a
Author: nrgaway
Status at Migration Time: resolved
Priority at Migration Time: Normal

Description

We are considering using ----force-unsafe-io and eatmydata options to speed up the performance of installing the Debian templates and was wondering what your thoughts would be on implementing same for Whonix11 build, either as standard or as a build option?

The following is Marek’s comment, and your will see he states he is receiving a huge performance boost; What used to take 40 minutes to install has been cut to 10 minutes.

dpkg is quite slow in installing packages, most likely because it calls fsync() at each file. In Qubes IO have noticeable latency, especially when building template (effectively two loop device layers, or even three when building in DispVM).
Those patches disables most of fsync calls, which greatly improve performance (prepare-chroot-debian takes 10min compared to over 40 earlier). debootstrap itself still still calls fsync, because I haven’t found a way to pass dpkg options there and Fedora doesn’t have eatmydata package.

Of course, there is nothing for free - here we pay with data integrity - if the system crashes during chroot/template preparation, most likely the only option would be to remove it and generate again.

You can view, comment on, or merge this pull request online at:

https://github.com/marmarek/qubes-builder-debian/pull/10

Commit Summary

Add --force-unsafe-io to speedup installation
Further performance optimization - use ‘eatmydata’ for IO-intensive calls

File Changes

M prepare-chroot-debian (9)
M prepare-chroot-qubuntu (6)
M template_debian/01_install_core.sh (2)
M template_debian/distribution.sh (8)
M template_debian/vars.sh (2)

Patch Links:

[[ https://github.com/marmarek/qubes-builder-debian/pull/10.patch | https://github.com/marmarek/qubes-builder-debian/pull/10.patch ]]
[[ https://github.com/marmarek/qubes-builder-debian/pull/10.diff | https://github.com/marmarek/qubes-builder-debian/pull/10.diff ]]

Comments


Patrick

2015-05-10 18:01:57 UTC


Patrick

2015-05-11 11:05:06 UTC


Patrick

2015-05-11 11:43:44 UTC


Patrick

2015-05-11 12:47:22 UTC


Patrick

2015-05-11 13:34:01 UTC


Patrick

2015-05-11 13:59:36 UTC


Patrick

2015-05-11 14:49:10 UTC


Patrick

2015-05-11 15:30:21 UTC


Patrick

2015-05-11 16:52:19 UTC


nrgaway

2015-05-15 21:56:59 UTC


Patrick

2015-05-16 01:15:04 UTC


nrgaway

2015-05-16 12:57:54 UTC