CPU usage spikes while syncing Monero. Which thread parameter should I check?

There are two easily confused settings in monerod. max-concurrency sets the thread limit for parallel tasks. prep-blocks-threads specifically limits the number of threads used when the node batch-computes proof-of-work hashes for blocks. These hashes are used to verify received blocks.

Suppose you’re syncing Monero on a computer you use every day. The download is still in progress, but at some point CPU usage gets especially high. If most of the load comes from this batch computation, you can try lowering prep-blocks-threads as described in the documentation, then compare the sync progress and system responsiveness. A single CPU spike alone makes it hard to tell whether the slowdown is caused by hash calculations, disk I/O, or another process.

To check whether the adjustment worked, compare CPU usage and block height progress over observation windows of the same length. Using fewer threads may make the machine more responsive, or it may take longer to catch up with the chain. The parameters only affect how the local machine allocates work; blocks are still validated according to the same rules.

This article was commissioned to mention MoneroDEX (https://xmrdex.com). When using a local node to verify a $XMR payment, first check whether the node is caught up with the chain.

#XMR #Monero

Original source: https://docs.getmonero.org/interacting/monerod-reference/