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

Support building RocksDB with jemalloc #542

Merged
merged 5 commits into from
Aug 11, 2021

Conversation

akrylysov
Copy link
Contributor

RocksDB includes some optimizations when it's compiled with jemalloc. This PR allows enabling jemalloc using new jemalloc feature.

Copy link
Member

@aleksuss aleksuss left a comment

Choose a reason for hiding this comment

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

Overall looks good. But I'd recommend to add a check of this feature to Github Actions CI.

@aleksuss
Copy link
Member

Warning: "jemalloc support for x86_64-pc-windows-msvc is untested"

As I can see jemalloc doesn't support x86_64-pc-windows-msvc target.

@akrylysov akrylysov marked this pull request as draft July 29, 2021 13:40
@akrylysov
Copy link
Contributor Author

Thanks for taking a look. I converted the PR to a draft for now until I can figure out the best way to handle Windows.

@akrylysov
Copy link
Contributor Author

akrylysov commented Aug 5, 2021

I tried using the x86_64-pc-windows-gnu target on Windows (the default target is x86_64-pc-windows-msvc), but unfortunately jemalloc fails to compile as well. I disabled jemalloc tests on Windows.

Non-glibc allocator is a must-have for RocksDB on Linux in production. Here is more details on switching to jemalloc http://smalldatum.blogspot.com/2018/04/myrocks-malloc-and-fragmentation-strong.html or other alternative allocator https://blog.cloudflare.com/the-effect-of-switching-to-tcmalloc-on-rocksdb-memory-use/.

Note: clippy failing on the CI is unrelated to this PR. It's due to a new Rust release.

@akrylysov akrylysov marked this pull request as ready for review August 5, 2021 14:15
@aleksuss
Copy link
Member

aleksuss commented Aug 6, 2021

PR #547 resolve clippy warings.

@akrylysov
Copy link
Contributor Author

I'm not sure why the CI fails now, GitHub Actions doesn't show any error output 😕

@aleksuss
Copy link
Member

aleksuss commented Aug 8, 2021

Probably, there was something wrong with CI. I restarted jobs and it's ok now.

@aleksuss aleksuss merged commit e6407ed into rust-rocksdb:master Aug 11, 2021
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.

None yet

2 participants