There have been multiple reports of massive reductions in memory and CPU usage with the new Monero 10.2.1 point release.

What specific optimizations led to the "massive speed improvements to RingCT validation" reported in the release notes? Which pull requests had the largest impact in reducing memory and CPU usage?

Memory usage:

The change in memory usage (Linux 64-bit) from Monero release 10.1 to 10.2 is just impressive (had some downtime in between the update): enter image description here

CPU usage:

Installing 0.10.2 on my VPS node lowered the CPU utilization from 40% to 4%. Nice! enter image description here

1 Answer 1


There were several changes:

This patch splits block and transaction data getters in two: one which retrieves the data, and the other also doing some parsing and reconstruction of the block or transaction. This allows skipping all the parsing (and reserializing) where it is not needed, which is mainly when serving blocks to other peers, but there are various other places where this helps.

This patch ensures that the "pre block add" lookups for inputs used in incoming transactions aren't performed for blocks which were already added recently. Since Monero download blocks concurrently from several peers, the first one to send a chunk of blocks will have those blocks added. Subsequent ones will then be able to early out if they determine that their work (or some of it) is now unneeded. This avoidance of extra lookups is particularly helpful on spinning disks, where someone reported a roughly 4 times speedup in sync (or a sample of 20k blocks).

This splits checks between those that are inherent to the transaction itself, and those that are dependent upon the blockchain (which can change over time). This removes some duplicate checks. Failing transactions (for the inherent checks) are also remembered, so they can be ignored when we see them again, without having to check them anew.

This caches some frequent RPC calls between wallet and daemon, speeding up transfer operations, and lessening the load on the daemon as a side effect.

Additionally, and this is not merged, there is a patch which decreases CPU load a lot on pools by caching block template: https://github.com/moneromooo-monero/bitmonero/tree/cache-block-template. This is used by several pools in production as far as I know, but was judged too risky to merge for now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.