diff --git a/polkadot/Cargo.toml b/polkadot/Cargo.toml index aa8d633c5c045..74f821e112c79 100644 --- a/polkadot/Cargo.toml +++ b/polkadot/Cargo.toml @@ -101,6 +101,7 @@ runtime-metrics = ["polkadot-cli/runtime-metrics"] pyroscope = ["polkadot-cli/pyroscope"] jemalloc-allocator = [ "dep:tikv-jemallocator", + "polkadot-cli/jemalloc-allocator", "polkadot-node-core-pvf-prepare-worker/jemalloc-allocator", "polkadot-node-core-pvf/jemalloc-allocator", "polkadot-overseer/jemalloc-allocator", diff --git a/polkadot/cli/Cargo.toml b/polkadot/cli/Cargo.toml index 9389d7eae8579..98b8d5743f445 100644 --- a/polkadot/cli/Cargo.toml +++ b/polkadot/cli/Cargo.toml @@ -82,3 +82,4 @@ runtime-metrics = [ "polkadot-node-metrics/runtime-metrics", "polkadot-service/runtime-metrics", ] +jemalloc-allocator = ["sc-service?/jemalloc-allocator"] diff --git a/prdoc/pr_10590.prdoc b/prdoc/pr_10590.prdoc new file mode 100644 index 0000000000000..492024933a305 --- /dev/null +++ b/prdoc/pr_10590.prdoc @@ -0,0 +1,14 @@ +title: 'sc-client-db: Make `jemalloc` optional' +doc: +- audience: Node Dev + description: |- + This changes `sc-client-db` to not always enable `jemalloc` by default for rocksdb. Instead it is now controlled by `jemalloc-allocator` feature. This is now also forwarded up to `polkadot` via `polkadot-cli` and `sc-service`. There we ultimately decide if `jemalloc` should be enabled or not. +crates: +- name: polkadot + bump: minor +- name: polkadot-cli + bump: minor +- name: sc-client-db + bump: minor +- name: sc-service + bump: minor diff --git a/substrate/client/db/Cargo.toml b/substrate/client/db/Cargo.toml index 2a8e2a78e11a1..8d898ea8bb4ff 100644 --- a/substrate/client/db/Cargo.toml +++ b/substrate/client/db/Cargo.toml @@ -27,7 +27,7 @@ codec = { features = ["derive"], workspace = true, default-features = true } hash-db = { workspace = true, default-features = true } kvdb = { workspace = true } kvdb-memorydb = { workspace = true } -kvdb-rocksdb = { optional = true, workspace = true, features = ["jemalloc"] } +kvdb-rocksdb = { optional = true, workspace = true } linked-hash-map = { workspace = true } log = { workspace = true, default-features = true } parity-db = { workspace = true } @@ -63,3 +63,4 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", ] rocksdb = ["kvdb-rocksdb", "sp-database/rocksdb"] +jemalloc-allocator = ["kvdb-rocksdb?/jemalloc"] diff --git a/substrate/client/service/Cargo.toml b/substrate/client/service/Cargo.toml index 110810746be02..ce354be9d66c9 100644 --- a/substrate/client/service/Cargo.toml +++ b/substrate/client/service/Cargo.toml @@ -87,3 +87,4 @@ runtime-benchmarks = [ "sc-client-db/runtime-benchmarks", "sp-runtime/runtime-benchmarks", ] +jemalloc-allocator = ["sc-client-db/jemalloc-allocator"]