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

pull laanwj wants to merge 1 commits into bitcoin:master from laanwj:2015_07_only_physical_cores changing 5 files +21 −4
  1. laanwj commented at 4:03 pm on July 1, 2015: member

    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.

  2. 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()](http://www.boost.org/doc/libs/1_58_0/doc/html/thread/thread_management.html#thread.thread_management.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.
    47162673c7
  3. laanwj added the label Bug on Jul 1, 2015
  4. laanwj commented at 4:22 pm on July 1, 2015: member
    We’ll also have to bump the boost version in depends for this to work (currently 1.55), but I remember that was already the plan for 0.12.
  5. theuni commented at 4:30 am on July 2, 2015: member

    @laanwj yes, we need to go ahead with the boost bump. I’m getting ready to leave for a few days for a conference, but I’ll make the boost/qt bumps first priority when I get back. Ideally those should be done very early in the cycle so we have some testing.

    Taking that one step further, I’ll check the other deps while I’m at it and see if they need bumps too.

  6. luke-jr commented at 5:21 am on July 2, 2015: member
    utACK
  7. paveljanik commented at 6:04 am on July 2, 2015: contributor
    ACK
  8. laanwj merged this on Jul 2, 2015
  9. laanwj closed this on Jul 2, 2015

  10. laanwj referenced this in commit d7ada03b8a on Jul 2, 2015
  11. sipa commented at 11:13 pm on July 9, 2015: member
    Posthumous ACK.
  12. luke-jr referenced this in commit 5c166950eb on Jan 10, 2016
  13. zkbot referenced this in commit df07f9ad23 on Feb 15, 2017
  14. zkbot referenced this in commit 0a80a1cea3 on Jun 16, 2017
  15. laanwj referenced this in commit bc679829e2 on Mar 6, 2018
  16. furszy referenced this in commit 4ed15cc69d on Jun 8, 2020
  17. PastaPastaPasta referenced this in commit 098ccb3aaa on Jun 10, 2020
  18. PastaPastaPasta referenced this in commit a12c3950ac on Jun 12, 2020
  19. PastaPastaPasta referenced this in commit d40a7323cb on Jun 13, 2020
  20. PastaPastaPasta referenced this in commit 1a40ff1e6e on Jun 14, 2020
  21. PastaPastaPasta referenced this in commit a00da7fb0e on Jun 14, 2020
  22. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-04 22:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me