snarkOS icon indicating copy to clipboard operation
snarkOS copied to clipboard

Add parallelism to ledger and reintroduce checks on `Ledger::load`

Open raychu86 opened this issue 3 years ago • 0 comments

Motivation

This PR adds the parallel feature to snarkos-node-ledger to enable parallelized block checks. Previously the block checks weren't properly being parallelized, leading to slow bootup times.

Here is a quick benchmark for loading blocks from the database:

Num Blocks Serial Time Per Block (Serial) Parallel Time Per Block (Parallel)
1 7.12ms 7.12ms - -
500 3.722s 7.445ms 142.423ms 284.846μs
1000 7.482s 7.482ms 265.575ms 265.575μs
10000 73.327s 7.332ms 2.522s 252.222μs
20000 148.191s 7.409ms 5.040s 252.033μs
100000 - - 25.322s 253.229μs

raychu86 avatar Nov 12 '22 02:11 raychu86