Don't auto-enable _flush_io on non-rotational media, it's too costly
This commit is contained in:
parent
bd27fcf3b7
commit
220819b9e7
@ -0,0 +1,34 @@
|
|||||||
|
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
|
||||||
|
|
6
rpm.spec
6
rpm.spec
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
%global rpmver 4.16.0
|
%global rpmver 4.16.0
|
||||||
%global snapver beta1
|
%global snapver beta1
|
||||||
%global rel 1
|
%global rel 2
|
||||||
|
|
||||||
%global srcver %{rpmver}%{?snapver:-%{snapver}}
|
%global srcver %{rpmver}%{?snapver:-%{snapver}}
|
||||||
%global srcdir %{?snapver:testing}%{!?snapver:rpm-%(echo %{rpmver} | cut -d'.' -f1-2).x}
|
%global srcdir %{?snapver:testing}%{!?snapver:rpm-%(echo %{rpmver} | cut -d'.' -f1-2).x}
|
||||||
@ -59,6 +59,7 @@ Patch5: rpm-4.12.0-rpm2cpio-hack.patch
|
|||||||
Patch6: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch
|
Patch6: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch
|
||||||
|
|
||||||
# Patches already upstream:
|
# Patches already upstream:
|
||||||
|
Patch100: 0001-Don-t-auto-enable-IO-flushing-on-non-rotational-disk.patch
|
||||||
|
|
||||||
# These are not yet upstream
|
# These are not yet upstream
|
||||||
Patch906: rpm-4.7.1-geode-i686.patch
|
Patch906: rpm-4.7.1-geode-i686.patch
|
||||||
@ -552,6 +553,9 @@ fi
|
|||||||
%doc doc/librpm/html/*
|
%doc doc/librpm/html/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 3 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.0-0.beta1.2
|
||||||
|
- Don't auto-enable _flush_io on non-rotational media, it's too costly
|
||||||
|
|
||||||
* Mon Jun 1 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.0-0.beta1.1
|
* Mon Jun 1 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.0-0.beta1.1
|
||||||
- Rebase to rpm 4.16.0-beta1
|
- Rebase to rpm 4.16.0-beta1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user