Commit bc42349
frame-omni-bencher: enable jemalloc-allocator (#11069)
Fix huge benchmark regression for storage-heavy extrinsics, enabling
jemalloc-allocator via polkadot-jemalloc-shim for omni-bencher, marked
as optional in the scope of PR #10590.
This close paritytech/trie#230.
Thanks @alexggh and @cheme for the help 🙇
Tested against `runtime / main` and
[2.1.0](polkadot-fellows/runtimes#1065) as
described
[here](paritytech/trie#230 (comment)).
For the `usual` exstrinsic `force_apply_min_commission` doing massive
storage allocation/deallocation on benchmark setup and then just 1read -
2 write in the benchmark extrinsic itself, times goes down from ms to
µs.
The regression was introduced by #10590 `sc-client-db: Make jemalloc
optional`
```bash
runtimes git:(sigurpol-release-2_0_6) /home/paolo/github/polkadot-sdk/target/release/frame-omni-bencher v1 benchmark pallet --runtime ./target/release/wbuild/asset-hub-polkadot-runtime/asset_hub_polkadot_runtime.compact.compressed.wasm --pallet pallet_staking_async --extrinsic "force_apply_min_commission" --steps 2 --repeat 1
2026-02-13T15:06:30.145367Z INFO frame::benchmark::pallet: Initialized runtime log filter to 'INFO'
2026-02-13T15:06:31.784936Z INFO pallet_collator_selection::pallet: assembling new collators for new session 0 at #0
2026-02-13T15:06:31.784966Z INFO pallet_collator_selection::pallet: assembling new collators for new session 1 at #0
2026-02-13T15:08:29.701636Z INFO frame::benchmark::pallet: [ 0 % ] Starting benchmark: pallet_staking_async::force_apply_min_commission
2026-02-13T15:08:35.130403Z INFO frame::benchmark::pallet: [ 0 % ] Running benchmark: pallet_staking_async::force_apply_min_commission (overtime)
Pallet: "pallet_staking_async", Extrinsic: "force_apply_min_commission", Lowest values: [], Highest values: [], Steps: 2, Repeat: 1
Raw Storage Info
========
Storage: `Staking::MinCommission` (r:1 w:0)
Proof: `Staking::MinCommission` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
Storage: `Staking::Validators` (r:1 w:1)
Proof: `Staking::Validators` (`max_values`: None, `max_size`: Some(45), added: 2520, mode: `MaxEncodedLen`)
Median Slopes Analysis
========
-- Extrinsic Time --
Model:
Time ~= 50.31
µs
Reads = 2
Writes = 1
Recorded proof Size = 564
Min Squares Analysis
========
-- Extrinsic Time --
Model:
Time ~= 50.31
µs
Reads = 2
Writes = 1
Recorded proof Size = 564
```
---------
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Bastian Köcher <git@kchr.de>1 parent dfb5c4b commit bc42349
File tree
4 files changed
+17
-13
lines changed- prdoc
- substrate
- frame/benchmarking/src
- utils/frame/omni-bencher
4 files changed
+17
-13
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | 293 | | |
307 | 294 | | |
308 | 295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
| |||
0 commit comments