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