From 2781f84bce11789a7d8127559a6de0d5cdf92e93 Mon Sep 17 00:00:00 2001 From: talyz Date: Wed, 6 Oct 2021 10:27:33 +0200 Subject: [PATCH] discourse.tests: Improve test performance Massively reduce the time it takes running the test by building a proper root disk image and increasing the virtualized core count to 4. This should make it much easier for the tests to pass even on weaker systems. With my laptop (AMD Ryzen 7 PRO 2700U, 32GB RAM) as the reference system, I see the following test run times: - No change: 25 mins, 49 secs - Building a root image: 4 mins, 44 secs - Building a root image and bumping the core count: 3 mins, 6 secs The times include the time it takes to build the image (~40 secs). --- nixos/tests/discourse.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/tests/discourse.nix b/nixos/tests/discourse.nix index 7dd39085a007..cfac5f84a62f 100644 --- a/nixos/tests/discourse.nix +++ b/nixos/tests/discourse.nix @@ -28,6 +28,8 @@ import ./make-test-python.nix ( { nodes, ... }: { virtualisation.memorySize = 2048; + virtualisation.cores = 4; + virtualisation.useNixStoreImage = true; imports = [ common/user-account.nix ];