HomePhabricator

Use real number of cores for default -par, ignore virtual cores
47162673c79cUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Use real number of cores for default -par, ignore virtual cores

To determine the default for -par, the number of script verification
threads, use boost::thread::physical_concurrency()
which counts only physical cores, not virtual cores.

Virtual cores are roughly a set of cached registers to avoid context
switches while threading, they cannot actually perform work, so spawning
a verification thread for them could even reduce efficiency and will put
undue load on the system.

Should fix issue #6358, as well as some other reported system overload
issues, especially on Intel processors.

The function was only introduced in boost 1.56, so provide a utility
function GetNumCores to fall back for older Boost versions.

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Jul 1 2015, 15:38
schancelPushed on Jan 5 2018, 21:58
schancelPushed on Jan 5 2018, 21:39
schancelPushed on Jan 5 2018, 21:17
Parents
rSTAGINGda77a6f7611f: Merge pull request #6354
Branches
Unknown
Tags
Unknown