aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorEvan Klitzke <evan@eklitzke.org>2018-03-06 12:50:20 -0500
committerEvan Klitzke <evan@eklitzke.org>2018-03-26 15:59:41 -0700
commitd54874d795a523d7cad5f4a9f4270145e56238f8 (patch)
treef39d91af0b1506f87c94c75aebf8e901530c70bc /src/init.cpp
parent0a018431c447bbf18bdaa6a1037aad6a87c1294a (diff)
Set SCHED_BATCH priority on the loadblk thread.
While reading another PR I saw a mention of #6358. The use case for SCHED_BATCH is to hint to the kernel that the thread is running a non-interactive workload that consumes a lot of CPU time. This is helpful on desktop machines where the loadblk thread can interfere with interactive applications. More details can be found in the sched(7) man page.
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index e5443eef0e..62767edbf8 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -625,6 +625,7 @@ void ThreadImport(std::vector<fs::path> vImportFiles)
{
const CChainParams& chainparams = Params();
RenameThread("bitcoin-loadblk");
+ ScheduleBatchPriority();
{
CImportingNow imp;