Skip to content

BlockIntervalSeconds metric & DB tests cleanup & benchmark improv.#2337

Merged
melekes merged 7 commits intodevelopfrom
anton/cleveldb
Sep 18, 2018
Merged

BlockIntervalSeconds metric & DB tests cleanup & benchmark improv.#2337
melekes merged 7 commits intodevelopfrom
anton/cleveldb

Conversation

@melekes
Copy link
Contributor

@melekes melekes commented Sep 5, 2018

DO NOT SQUASH

@codecov-io
Copy link

codecov-io commented Sep 5, 2018

Codecov Report

Merging #2337 into develop will decrease coverage by 0.19%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           develop    #2337     +/-   ##
==========================================
- Coverage    61.08%   60.89%   -0.2%     
==========================================
  Files          197      197             
  Lines        16246    16297     +51     
==========================================
  Hits          9924     9924             
- Misses        5460     5508     +48     
- Partials       862      865      +3
Impacted Files Coverage Δ
config/config.go 82.58% <ø> (ø) ⬆️
config/toml.go 53.19% <ø> (ø) ⬆️
consensus/reactor.go 71.27% <0%> (-1.88%) ⬇️
libs/db/debug_db.go 20.63% <0%> (+4.63%) ⬆️

Copy link
Contributor

@ValarDragon ValarDragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a good idea to me! Do we need to add libstdc++ as a dependency in the installation instructions?

@melekes
Copy link
Contributor Author

melekes commented Sep 10, 2018

Do we need to add libstdc++ as a dependency in the installation instructions?

6730374

@melekes melekes requested a review from zramsay as a code owner September 10, 2018 10:56
@ValarDragon
Copy link
Contributor

I'm kind of confused why we have syndtr/goleveldb and jmhodges/levigo, can we remove the syndtr/goleveldb dependency as well?

@melekes
Copy link
Contributor Author

melekes commented Sep 11, 2018

can we remove the syndtr/goleveldb dependency as well?

I think we still want to have a key-value DB written in Go so we can cross-compile easy. But I am less convinced now that it should be default since a) syndtr/goleveldb#226 b) it is magnitude slower than C I will try to verify this claim

@ValarDragon
Copy link
Contributor

I'm super in favor of just using CLevelDB. I don't think its reasonable to support cross-compilation long term, if we want faster crypto speeds / or any of the newer cryptography ideas. (e.g. BLS)

@ebuchman
Copy link
Contributor

Go-ethereum still uses syndtr/goleveldb exclusively so it could be something about the way we are configuring it? Also can you point to any popular/production products using this fork of leveldb? Is something of DataDog's using it ?

@ValarDragon
Copy link
Contributor

We currently compact every single block. We need to significantly reduce the frequency of compactions imo.

@melekes
Copy link
Contributor Author

melekes commented Sep 13, 2018

We currently compact every single block. We need to significantly reduce the frequency of compactions imo.

yes, but this is out of scope of this PR. Here I only update outdated cleveldb library.

Also can you point to any popular/production products using this fork of leveldb? Is something of DataDog's using it ?

Datadog is using it for sure.

@melekes
Copy link
Contributor Author

melekes commented Sep 13, 2018

@melekes
Copy link
Contributor Author

melekes commented Sep 17, 2018

DataDog/leveldb@12a0b6e

643805ecb6a4f9aaddc0652cb57ba0963162abe2c2a40b8c12aa31bbc80e645f  deps.leveldb.tar.gz
541e9d781f23b64933c8df7db7e206f047be7091c8c29e8a34a6e025a7ab960e  leveldb.v1.19.tar.gz

Files l2/include/leveldb/c.h and leveldb/deps/leveldb/include/leveldb/c.h differ
Files l2/include/leveldb/options.h and leveldb/deps/leveldb/include/leveldb/options.h differ
Files l2/port/atomic_pointer.h and leveldb/deps/leveldb/port/atomic_pointer.h differ
Files l2/table/format.cc and leveldb/deps/leveldb/table/format.cc differ
Files l2/table/table_builder.cc and leveldb/deps/leveldb/table/table_builder.cc differ
Files l2/util/options.cc and leveldb/deps/leveldb/util/options.cc differ

ask DataDog guys what are they using leveldb for

just saw there is no "Issues" tag in https://github.com/DataDog/leveldb. maybe it is a bad idea after all

@melekes melekes force-pushed the anton/cleveldb branch 2 times, most recently from 73b9ed3 to 6929ba7 Compare September 17, 2018 09:30
@melekes melekes changed the title switch from jmhodges/levigo to DataDog/leveldb BlockIntervalSeconds metric & DB tests cleanup & benchmark improv. Sep 17, 2018
Why:
original fork is abandoned and not supported anymore.

Changes:
- LevelDB 1.19 (LevelDB and Snappy are both compiled and linked statically, so while you will not need them installed on your target machine, you should have a roughly compatible version of libstdc++.)
- snappy and lz4 libs included by default
otherwise we're benchmarking overriding single key (because hash stays
the same!)
@melekes melekes merged commit 64fc8f8 into develop Sep 18, 2018
@melekes melekes deleted the anton/cleveldb branch September 18, 2018 08:48
make && \
sudo scp -r out-static/lib* out-shared/lib* /usr/local/lib/ && \
cd include/ && \
sudo scp -r leveldb /usr/local/include/ && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we do this all without using sudo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think so, yeah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants