[Bitcoin-development] LevelDB benchmarking
mike at plan99.net
Mon Jun 18 18:41:43 UTC 2012
I switched the transaction database to use the Google LevelDB library,
which is a refactored out part of BigTable.
Here are my results. All tests are done on this hard disk:
which has an average 8.9msec seek time. It is a 6 core Ubuntu machine.
I used -loadblock on a chain with with 185127 blocks in it, so it has
lots of SatoshiDice traffic.
8.9 ms (average) seek time
>> Regular BDB as we have today:
Throughput usually 4-5MB/sec according to iotop, pauses of 8-10
seconds for “Flushing wallet ...”. 611mb of blkindex.dat
>> BDB without sig checking
Disabling EC verification halves running time.
>> LevelDB no customized options
(I ran the wrong time command here, hence the different format)
3184.73user 181.02system 51:20.81elapsed 109%CPU (0avgtext+0avgdata
1104inputs+125851776outputs (293569major+37436202minor)pagefaults 0swaps
So, 50 minutes. Throughput often in range of 20-30mb/sec. 397MB of data files.
>> LevelDB w/ 10 bit per key bloom filter
424mb of data files
>> LevelDB w/ 10 bit per key bloom filter + 30mb cache (up from 8mb by default)
No change. The reason is, signature checking is the bottleneck not IO.
>> LevelDB w/10 bit per key bloom filter, 30mb cache, no sigs
12 minutes vs 42 minutes for BDB on the same benchmark.
Conclusion: LevelDB is a clear win, taking a sync in the absence of
network delays from 95 minutes to 50, at which point signature
checking becomes the bottleneck. It is nearly 4x as fast when
signature checks are not done (ie, when receiving a block containing
only mempool transactions you already verified).
More information about the bitcoin-dev