mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-14 06:32:33 +01:00
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.
This commit is contained in:
@@ -625,6 +625,7 @@ void ThreadImport(std::vector<fs::path> vImportFiles)
|
||||
{
|
||||
const CChainParams& chainparams = Params();
|
||||
RenameThread("bitcoin-loadblk");
|
||||
ScheduleBatchPriority();
|
||||
|
||||
{
|
||||
CImportingNow imp;
|
||||
|
||||
Reference in New Issue
Block a user