:: Re: [Libbitcoin] Suprising libbitco…
Góra strony
Delete this message
Reply to this message
Autor: Amir Taaki
Data:  
Dla: libbitcoin
Temat: Re: [Libbitcoin] Suprising libbitcoin blockchain results (too suprising?)
$ sudo ../drop_caches.sh
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 1842.195560
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 1488.830695
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 1282.912364
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 1070.436222
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 910.116355
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 839.505015
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 784.259028
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 708.437915
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 643.408458
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 579.905053
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 546.271917
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 511.428979
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 445.314160
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 432.520070
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 399.232788
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 360.439812
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 370.088049
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 343.255844
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 313.684741
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 280.988404
...
$ ./htdb_slab_read 1000
DEBUG [ht.get()]: iterations = 1000 buckets = 30000000 | 26.448636

On 03/08/14 23:17, Amir Taaki wrote:
> Hi!
>
> I'm working on blockchain performance and I'm getting some strong
> performance statistics when comparing my own code against LevelDB.
> I want some feedback on my testing methodology.
>
> https://github.com/libbitcoin/libbitcoin_blockchain/tree/master/benchmark/large-bench
>
> See the README for an explanation.
>
> Here are the results I get (database = 30 million rows):
>
> 100k random keys:
> * libbitcoin htdb_slab = 20 seconds (20k ms)
> * leveldb = 48 seconds
>
> 10 million keys:
> * htdb_slab = 37 seconds
> * leveldb = 373 seconds
> * null (no database, randomly iterate flat file) = 10 seconds
>
> I drop the cache before each test. Is the kernel simply that good that
> the more I run the test, the better the caching works and throughput
> such that I improve from 40% to 10% of LevelDB's read speed? Seems very
> drastic.
>
> Also interesting to note is that performance difference for my database
> and LevelDB's for small datasets is not significant, but when you stuff
> more data into LevelDB it really starts to choke and performance
> degrades significantly.
>
> See below for actual commands.
>
> -----------------------------------------------
>
> Prepare initial databases:
>
> $ ./prepare 30000000
> Done.
> $ ./leveldb_write
> Wrote 30000000 values. Done.
> $ ./htdb_slab_write 30000000
> Buckets: 30000000
> Wrote 30000000 values. Done.
>
> Running the benchmark itself (read 100k random keys):
>
> $ sudo ../drop_caches.sh
> $ ./htdb_slab_read 100000
> DEBUG [ht.get()]: iterations = 100000 buckets = 30000000 |
> 19996.761275
> $ sudo ../drop_caches.sh
> $ ./leveldb_read 100000
> DEBUG [leveldb.Get()]: iterations = 100000 |
> 47950.581767
>
> Now for 10 million random keys:
>
> $ sudo ../drop_caches.sh
> $ ./htdb_slab_read 10000000
> DEBUG [ht.get()]: iterations = 10000000 buckets = 30000000 |
> 37031.098962
> $ sudo ../drop_caches.sh
> $ ./leveldb_read 10000000
> DEBUG [leveldb.Get()]: iterations = 10000000 |
> 373072.996571
> $ sudo ../drop_caches.sh
> $ ./null_read 10000000
> DEBUG [None]: iterations = 10000000 | 9972.837145
>
>
>
>
> _______________________________________________
> Libbitcoin mailing list
> Libbitcoin@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/libbitcoin
>