From 6e7ae9a2392f0408139992f226341fc56b0e24ce Mon Sep 17 00:00:00 2001 From: Greg Price Date: Mon, 22 Jan 2018 16:33:56 -0800 Subject: [PATCH] test-install: Run installer under eatmydata. This is a tool that throws away `fsync` calls and other requests for the system to sync files to disk. It may make the install faster; for example, if it has to install a number of system packages, `dpkg` is known to make a lot of `fsync` calls which slow things down significantly. Conversely, if there's a power failure in the middle of running a test install, we really don't mind if the test install's data becomes corrupt. --- tools/test-install/install | 4 +--- tools/test-install/prepare-base | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/test-install/install b/tools/test-install/install index 15530b9ba7..c1a4cb8a64 100755 --- a/tools/test-install/install +++ b/tools/test-install/install @@ -71,9 +71,7 @@ if [ -z "ok" ]; then exit 1 fi -run /tmp/src/zulip-server/scripts/setup/install --snakeoil-cert "${INSTALLER_ARGS[@]}" +run eatmydata -- /tmp/src/zulip-server/scripts/setup/install --snakeoil-cert "${INSTALLER_ARGS[@]}" # TODO install ends as a zombie (workaround: `sudo ps aux | grep lxc-attach`, kill that) # TODO settings.py, initialize-database, create realm - -# TODO eatmydata, for speed diff --git a/tools/test-install/prepare-base b/tools/test-install/prepare-base index 205a9a04bb..daec8fd4a4 100755 --- a/tools/test-install/prepare-base +++ b/tools/test-install/prepare-base @@ -37,7 +37,7 @@ run apt-get update # As an optimization, we install a bunch of packages the installer # would install for itself. run apt-get install -y --no-install-recommends \ - xvfb parallel netcat unzip zip jq python3-pip wget curl realpath \ + xvfb parallel netcat unzip zip jq python3-pip wget curl realpath eatmydata \ git crudini openssl ssl-cert \ build-essential python3-dev \ closure-compiler memcached rabbitmq-server redis-server \