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 callsFile 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.diff