-
Notifications
You must be signed in to change notification settings - Fork 703
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
enabling the jemalloc feature doesn't actually enable jemalloc #863
Comments
Note that rust-rocksdb enables the Also note that if let Some(jemalloc_root) = std::env::var_os("DEP_JEMALLOC_ROOT") {
config.include(Path::new(&jemalloc_root).join("include"));
} |
It also looks like RocksDB will not directly use jemalloc even if ROCKSDB_JEMALLOC is defined, the allocator needs to be set explicitly using |
so for this point, I confirmed with rocksdb devs that this is not a requirement: facebook/rocksdb#12364 (comment) |
my current change (while not ideal because it doesn't link to jemalloc used by tikv but relies on the system jemalloc) does get rocksdb to recognize jemalloc because when i set |
I tried:
and that didn't get malloc stats to work I also tried:
and that failed the build as rocksdb couldn't find jemalloc. Did I misunderstand your suggestion? |
I think it doesn't actually link to the system jemalloc, but only uses the headers from it (the static jemalloc will be prioritized by the linker).
No, that seems good, it builds for me locally.
|
ok to be clear, I tried that on my mac and that failed, let me try on linux which is what i run in prod |
ok confirmed working on linux! |
it looks like what we want to do is something similar to what tikv rust-rocksdb does;https://github.com/tikv/rust-rocksdb/blob/05fc3f80ed50bac9932ca238e9dfbaadb7390965/librocksdb_sys/build.rs#L26C7-L26C26 to make sure the build doesn't fail on mac when trying to enable jemalloc. going to test this out. |
and confirmed working, I'll make the change on my end. Thanks for the help on this! |
Rust uses |
If using rust-rocksdb with the jemalloc feature enabled, I think yes. |
See facebook/rocksdb#12364 & zaidoon1/rust-rocksdb#23
The text was updated successfully, but these errors were encountered: