Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contribute-nearcore: add info on ROCKSDB_LIB_DIR and other minor updates #1076

Merged
merged 2 commits into from
Jun 3, 2022

Conversation

mina86
Copy link
Contributor

@mina86 mina86 commented Jun 3, 2022

Most notably, add a section about compiling while using rocksdb
library provided by the system. Based on my observation, this helps
with OOMs. I think (though I haven’t tested it) that rust-rocksdb
builds rocksdb library with LTO enabled which consumes bunch of
memory.

While at it, make some minor fixes to the document. Change ‘bash’
preformatted blocks to ‘console’ where the latter is more appropriate
and remove mention of start_localnet.py script which no longer
exists.

Also add env to replace time VAR=foo command since the latter only
works with some shells which provide time built-in. Using env to
set the environment variables makes it more portable.

Most notably, add a section about compiling while using rocksdb
library provided by the system.  Based on my observation, this helps
with OOMs.  I think (though I haven’t tested it) that rust-rocksdb
builds rocksdb library with LTO enabled which consumes bunch of
memory.

While at it, make some minor fixes to the document.  Change ‘bash’
preformatted blocks to ‘console’ where the latter is more appropriate
and remove mention of `start_localnet.py` script which no longer
exists.
@mina86 mina86 requested a review from nagisa June 3, 2022 02:33
@mina86 mina86 requested a review from bucanero as a code owner June 3, 2022 02:33
@render
Copy link

render bot commented Jun 3, 2022

# time RUSTFLAGS='-C lto=off -C link-arg=-fuse-ld=lld' RUSTC_WRAPPER= cargo build -p neard --release
```console
$ cargo clean
$ time RUSTFLAGS='-C lto=off -C link-arg=-fuse-ld=lld' RUSTC_WRAPPER= cargo build -p neard --release
Copy link
Contributor

Choose a reason for hiding this comment

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

NB: this is going to be shortly made more straightforward via -Clinker-flavor=gcc:lld, with or without -Clink-self-contained=linker. We should keep an action item for that.

@nagisa
Copy link
Contributor

nagisa commented Jun 3, 2022

largely LGTM.

@mina86 mina86 merged commit 582a7c5 into master Jun 3, 2022
@mina86 mina86 deleted the mpn-rocks branch June 3, 2022 14:55
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.

2 participants