rpm/0001-Don-t-auto-enable-IO-flushing-on-non-rotational-disk.patch

35 lines
1.2 KiB
Diff

From ca78aff0bcf36b480e9776535ab3e74dbb5a8f50 Mon Sep 17 00:00:00 2001
Message-Id: <ca78aff0bcf36b480e9776535ab3e74dbb5a8f50.1591169016.git.pmatilai@redhat.com>
From: Panu Matilainen <pmatilai@redhat.com>
Date: Wed, 3 Jun 2020 10:17:33 +0300
Subject: [PATCH] Don't auto-enable IO flushing on non-rotational disks
Commit 47e2463d8a98a7535e141d59d17be17d5a30862c added logic to enable
%_flush_io automatically on non-rotational disks to avoid trashing system
caches and IO peaks on the grounds that this isn't so expensive on SSD,
but real world experience suggests otherwise. Install times go from
seconds to minutes which might not matter for the random individual system
but for build systems and the like churning away continuously...
---
lib/transaction.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/lib/transaction.c b/lib/transaction.c
index 49b564f8d..1156bb9f5 100644
--- a/lib/transaction.c
+++ b/lib/transaction.c
@@ -1478,10 +1478,8 @@ static void setSSD(int enable)
if (enable) {
rpmlog(RPMLOG_DEBUG, "optimizing for non-rotational disks\n");
ensureMacro("_minimize_writes", "1");
- ensureMacro("_flush_io", "1");
} else {
rpmPopMacro(NULL, "_minimize_writes");
- rpmPopMacro(NULL, "_flush_io");
}
}
--
2.26.2