]> pere.pagekite.me Git - homepage.git/commitdiff
New post about eatmydata.
authorPetter Reinholdtsen <pere@hungry.com>
Fri, 25 Nov 2016 13:47:52 +0000 (14:47 +0100)
committerPetter Reinholdtsen <pere@hungry.com>
Fri, 25 Nov 2016 13:47:52 +0000 (14:47 +0100)
blog/data/2016-11-25-d-i-eatmydata.txt [new file with mode: 0644]

diff --git a/blog/data/2016-11-25-d-i-eatmydata.txt b/blog/data/2016-11-25-d-i-eatmydata.txt
new file mode 100644 (file)
index 0000000..9c2802c
--- /dev/null
@@ -0,0 +1,43 @@
+Title: Quicker Debian installations using eatmydata
+Tags: english, debian, debian edu
+Date: 2016-11-25 14:50
+
+<p>Two years ago, I did some experiments with eatmydata and the Debian
+installer, observing how using
+<a href="http://people.skolelinux.org/pere/blog/Speeding_up_the_Debian_installer_using_eatmydata_and_dpkg_divert.html">eatmydata
+could speed up the installation</a> quite a bit.  My testing measured
+speedup around 20-40 percent for Debian Edu, where we install around
+1000 packages from within the installer.  The eatmydata package is a
+way to disable/delay file system flushing.  This is a bit risky in the
+general case, as files that should be stored on disk will stay only in
+memory a bit longer than expected, causing problems if a machine
+crashes at an inconvenient time.  But for an installation, if the
+machine crashes during installation the process is normally restarted,
+and avoiding disk operations as much as possible to speed up the
+process make perfect sense.
+
+<p>I added code in the Debian Edu specific installation code to enable
+<a href="https://tracker.debian.org/pkg/libeatmydata">eatmydata</a>,
+but did not have time to push it any further.  But a few months ago I
+picked it up again and worked with the libeatmydata package maintainer
+Mattia Rizzolo to make it easier for everyone to get this installation
+speedup in Debian.  Thanks to our cooperation There is now an
+eatmydata-udeb package in Debian testing and unstable, and simply
+enabling/installing it in debian-installer (d-i) is enough to get the
+quicker installations.  It can be enabled using preseeding.  The
+following untested kernel argument should do the trick:</p>
+
+<blockquote><pre>
+preseed/early_command="anna-install eatmydata-udeb"
+</pre></blockquote>
+
+<p>This should ask d-i to install the package inside the d-i
+environment early in the installation sequence.  Having it installed
+in d-i in turn will make sure the relevant scripts are called just
+after debootstrap filled /target/ with the freshly installed Debian
+system to configure apt to run dpkg with eatmydata.  This is enough to
+speed up the installation process.  There is a proposal to
+<a href="https://bugs.debian.org/841153">extend the idea a bit further
+by using /etc/ld.so.preload instead of apt.conf</a>, but I have not
+tested its impact.</p>
+