]> pere.pagekite.me Git - homepage.git/blob - blog/data/2016-11-25-d-i-eatmydata.txt
Generated.
[homepage.git] / blog / data / 2016-11-25-d-i-eatmydata.txt
1 Title: Quicker Debian installations using eatmydata
2 Tags: english, debian, debian edu
3 Date: 2016-11-25 14:50
4
5 <p>Two years ago, I did some experiments with eatmydata and the Debian
6 installation system, observing how using
7 <a href="http://people.skolelinux.org/pere/blog/Speeding_up_the_Debian_installer_using_eatmydata_and_dpkg_divert.html">eatmydata
8 could speed up the installation</a> quite a bit. My testing measured
9 speedup around 20-40 percent for Debian Edu, where we install around
10 1000 packages from within the installer. The eatmydata package
11 provide a way to disable/delay file system flushing. This is a bit
12 risky in the general case, as files that should be stored on disk will
13 stay only in memory a bit longer than expected, causing problems if a
14 machine crashes at an inconvenient time. But for an installation, if
15 the machine crashes during installation the process is normally
16 restarted, and avoiding disk operations as much as possible to speed
17 up the process make perfect sense.
18
19 <p>I added code in the Debian Edu specific installation code to enable
20 <a href="https://tracker.debian.org/pkg/libeatmydata">eatmydata</a>,
21 but did not have time to push it any further. But a few months ago I
22 picked it up again and worked with the libeatmydata package maintainer
23 Mattia Rizzolo to make it easier for everyone to get this installation
24 speedup in Debian. Thanks to our cooperation There is now an
25 eatmydata-udeb package in Debian testing and unstable, and simply
26 enabling/installing it in debian-installer (d-i) is enough to get the
27 quicker installations. It can be enabled using preseeding. The
28 following untested kernel argument should do the trick:</p>
29
30 <blockquote><pre>
31 preseed/early_command="anna-install eatmydata-udeb"
32 </pre></blockquote>
33
34 <p>This should ask d-i to install the package inside the d-i
35 environment early in the installation sequence. Having it installed
36 in d-i in turn will make sure the relevant scripts are called just
37 after debootstrap filled /target/ with the freshly installed Debian
38 system to configure apt to run dpkg with eatmydata. This is enough to
39 speed up the installation process. There is a proposal to
40 <a href="https://bugs.debian.org/841153">extend the idea a bit further
41 by using /etc/ld.so.preload instead of apt.conf</a>, but I have not
42 tested its impact.</p>
43