From d54874d795a523d7cad5f4a9f4270145e56238f8 Mon Sep 17 00:00:00 2001 From: Evan Klitzke Date: Tue, 6 Mar 2018 12:50:20 -0500 Subject: 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. --- src/init.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/init.cpp') 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 vImportFiles) { const CChainParams& chainparams = Params(); RenameThread("bitcoin-loadblk"); + ScheduleBatchPriority(); { CImportingNow imp; -- cgit v1.2.3