bitcoind takes 670% CPU usage at first sync #6358

issue Mellnik opened this issue on June 30, 2015
  1. Mellnik commented at 8:31 PM on June 30, 2015: none

    and a unix load of 6.41 even though I only have a Quad Core CPU. It renders my machine fully unusable. I set it's nice value to 10 for now.

    http://puu.sh/iIDtg/021875dd2a.png

  2. laanwj commented at 6:19 AM on July 1, 2015: member

    Which version? What arguments / bitcoin.conf settings? You're sure you don't have -gen=1 enabled?

    You an try e.g. -par=1 to reduce the number of script verification threads. By default it uses as many threads as there are cores available minus one, but it may be mis-estimating this.

    Can you find a message like this in your debug.log:

    2015-06-29 09:35:16 Using 5 threads for script verification
    
  3. laanwj added the label Validation on Jul 1, 2015
  4. Mellnik commented at 12:07 PM on July 1, 2015: none

    0.10.2 x64

    Config:

    disablewallet=1
    maxconnections=1000
    timeout=10000
    allowreceivebyip=1
    
    bind=213.163.74.163:8333
    bind=[2a00:1630:2:1901::b7c]:8333
    rpcuser=bitcoinrpc
    rpcpassword=xyz
    
    addnode=node.bitcoin.xxx
    addnode=x.jine.se
    addnode=bitcoin.coinprism.com
    addnode=btcnode1.evolyn.net
    addnode=faucet.bitcoin.st
    
    addnode=messier.bzfx.net
    

    screen ./bitcoind -server

    By now I rsynced the blockchain from my older node. CPU usage now at 1.8% after all blocks are present.

    2015-06-30 21:05:40 Using 8 threads for script verification
    

    Probably 8 because of HT.

  5. laanwj commented at 3:34 PM on July 1, 2015: member

    So it looks like boost::thread::hardware_concurrency(), which is used to determine the default concurrency, also counts 'fake' HT cores. It is a bit disappointing but I'm not sure what underlying APIs for querying this that operating systems expose in any case.

    There is also boost::thread::physical_concurrency() maybe it works better, as it claims not to count 'virtual cores'.

  6. laanwj referenced this in commit 401ee9a978 on Jul 1, 2015
  7. laanwj referenced this in commit 47162673c7 on Jul 1, 2015
  8. laanwj cross-referenced this on Jul 1, 2015 from issue Use real number of cores for default -par, ignore virtual cores by laanwj
  9. luke-jr referenced this in commit fabfc4d39e on Jul 2, 2015
  10. sipa commented at 11:15 PM on July 9, 2015: member

    I'm marking this as fixed by #6361. Comment if this is not correct, please.

  11. sipa closed this on Jul 9, 2015

  12. luke-jr referenced this in commit 5c166950eb on Jan 10, 2016
  13. laanwj cross-referenced this on Apr 25, 2017 from issue Use std::thread::hardware_concurrency, instead of Boost, to determine available cores by fanquake
  14. eklitzke referenced this in commit 6c071326df on Mar 6, 2018
  15. eklitzke referenced this in commit cb89fcaa83 on Mar 6, 2018
  16. eklitzke cross-referenced this on Mar 6, 2018 from issue Set SCHED_BATCH priority on the loadblk thread. by eklitzke
  17. eklitzke referenced this in commit a2ed276b52 on Mar 19, 2018
  18. eklitzke referenced this in commit ce91d3814f on Mar 26, 2018
  19. eklitzke referenced this in commit 0d5541efc1 on Mar 26, 2018
  20. eklitzke referenced this in commit 8fe7e956a7 on Mar 26, 2018
  21. eklitzke referenced this in commit d54874d795 on Mar 26, 2018
  22. laanwj referenced this in commit becd8dd2ec on Apr 7, 2018
  23. stamhe referenced this in commit bccc2c52fe on Jun 27, 2018
  24. HashUnlimited referenced this in commit f461627fc7 on Aug 15, 2018
  25. HashUnlimited cross-referenced this on Aug 15, 2018 from issue Set SCHED_BATCH priority on the loadblk thread. by HashUnlimited
  26. lionello referenced this in commit c4575ba159 on Nov 7, 2018
  27. joemphilips referenced this in commit 14f77e5ff2 on Nov 9, 2018
  28. lateminer referenced this in commit 22c5026abd on Jan 22, 2019
  29. random-zebra referenced this in commit d704fd9fb6 on May 27, 2020
  30. random-zebra referenced this in commit 417cff617b on May 27, 2020
  31. random-zebra referenced this in commit d4476131bd on May 28, 2020
  32. PastaPastaPasta referenced this in commit 1f46de1973 on Dec 16, 2020
  33. PastaPastaPasta referenced this in commit 02edd7066e on Dec 18, 2020
  34. furszy referenced this in commit ed9c67a2d2 on Feb 17, 2021
  35. furszy referenced this in commit 743804e3fd on Feb 24, 2021
  36. bitcoin 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: 2026-05-20 06:55 UTC