Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Update FRAME System Weights #2542

Closed
wants to merge 2 commits into from

Conversation

shawntabrizi
Copy link
Member

Follow up to: #2541

@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Feb 28, 2021
@shawntabrizi
Copy link
Member Author

/benchmark runtime polkadot frame_system

@parity-benchapp
Copy link

parity-benchapp bot commented Feb 28, 2021

Finished benchmark for branch: shawntabrizi-new-system-weights

Benchmark: Benchmark Runtime Polkadot Pallet

cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=frame_system --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/

Results

Pallet: "frame_system", Extrinsic: "remark", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 1.264
+ b 0
µs

Reads = 0 + (0 * b)
Writes = 0 + (0 * b)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
b mean µs sigma µs %
0 1.171 0.008 0.6%
78643 1.263 0.01 0.7%
157286 1.286 0.008 0.6%
235929 1.293 0.009 0.6%
314572 1.28 0.009 0.7%
393215 1.284 0.004 0.3%
471858 1.293 0.006 0.4%
550501 1.274 0.009 0.7%
629144 1.298 0.007 0.5%
707787 1.297 0.011 0.8%
786430 1.286 0.007 0.5%
865073 1.28 0.011 0.8%
943716 1.284 0.008 0.6%
1022359 1.262 0.009 0.7%
1101002 1.278 0.009 0.7%
1179645 1.28 0.01 0.7%
1258288 1.265 0.006 0.4%
1336931 1.258 0.006 0.4%
1415574 1.259 0.013 1.0%
1494217 1.266 0.006 0.4%
1572860 1.261 0.01 0.7%
1651503 1.269 0.01 0.7%
1730146 1.275 0.006 0.4%
1808789 1.262 0.007 0.5%
1887432 1.277 0.009 0.7%
1966075 1.286 0.009 0.6%
2044718 1.273 0.017 1.3%
2123361 1.264 0.009 0.7%
2202004 1.279 0.006 0.4%
2280647 1.272 0.009 0.7%
2359290 1.275 0.012 0.9%
2437933 1.263 0.012 0.9%
2516576 1.293 0.011 0.8%
2595219 1.291 0.01 0.7%
2673862 1.302 0.008 0.6%
2752505 1.318 0.013 0.9%
2831148 1.288 0.017 1.3%
2909791 1.316 0.01 0.7%
2988434 1.322 0.015 1.1%
3067077 1.315 0.014 1.0%
3145720 1.318 0.012 0.9%
3224363 1.307 0.011 0.8%
3303006 1.309 0.005 0.3%
3381649 1.307 0.012 0.9%
3460292 1.291 0.012 0.9%
3538935 1.314 0.008 0.6%
3617578 1.298 0.016 1.2%
3696221 1.313 0.019 1.4%
3774864 1.32 0.007 0.5%
3853507 1.307 0.015 1.1%
3932150 1.336 0.01 0.7%

Quality and confidence:
param error
b 0

Model:
Time ~= 1.26
+ b 0
µs

Reads = 0 + (0 * b)
Writes = 0 + (0 * b)
Pallet: "frame_system", Extrinsic: "remark_with_event", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 3.951
+ b 0.001
µs

Reads = 0 + (0 * b)
Writes = 0 + (0 * b)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
b mean µs sigma µs %
0 15.6 0.039 0.2%
78643 119.3 0.316 0.2%
157286 213.8 0.424 0.1%
235929 309.2 0.229 0.0%
314572 403.4 0.895 0.2%
393215 498.4 0.579 0.1%
471858 592.8 0.715 0.1%
550501 692 4.926 0.7%
629144 784.8 2.352 0.2%
707787 878.8 0.488 0.0%
786430 975 1.37 0.1%
865073 1074 10.49 0.9%
943716 1163 1.021 0.0%
1022359 1263 8.37 0.6%
1101002 1360 11.63 0.8%
1179645 1452 5.213 0.3%
1258288 1558 11.75 0.7%
1336931 1642 5.108 0.3%
1415574 1746 10.2 0.5%
1494217 1837 9.017 0.4%
1572860 1934 11.12 0.5%
1651503 2044 11.35 0.5%
1730146 2125 11.29 0.5%
1808789 2226 11.79 0.5%
1887432 2325 9.579 0.4%
1966075 2417 10.35 0.4%
2044718 2511 12.1 0.4%
2123361 2633 8.826 0.3%
2202004 2716 10.07 0.3%
2280647 2809 11.69 0.4%
2359290 2911 8.923 0.3%
2437933 3008 9.11 0.3%
2516576 3098 9.004 0.2%
2595219 3194 12.09 0.3%
2673862 3300 9.11 0.2%
2752505 3398 8.471 0.2%
2831148 3491 10.5 0.3%
2909791 3599 5.958 0.1%
2988434 3706 10.81 0.2%
3067077 3792 11.56 0.3%
3145720 3911 7.895 0.2%
3224363 4007 6.73 0.1%
3303006 4097 7.972 0.1%
3381649 4205 16.19 0.3%
3460292 4305 3.202 0.0%
3538935 4403 10.59 0.2%
3617578 4507 4.373 0.0%
3696221 4619 11.26 0.2%
3774864 4722 8.028 0.1%
3853507 4829 10.66 0.2%
3932150 4921 7.422 0.1%

Quality and confidence:
param error
b 0

Model:
Time ~= 0
+ b 0.001
µs

Reads = 0 + (0 * b)
Writes = 0 + (0 * b)
Pallet: "frame_system", Extrinsic: "set_heap_pages", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 1.74
µs

Reads = 0
Writes = 1
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 1.74
µs

Reads = 0
Writes = 1
Pallet: "frame_system", Extrinsic: "set_changes_trie_config", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 9.222
µs

Reads = 1
Writes = 2
Min Squares Analysis

-- Extrinsic Time --

Model:
Time ~= 9.222
µs

Reads = 1
Writes = 2
Pallet: "frame_system", Extrinsic: "set_storage", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 0
+ i 0.572
µs

Reads = 0 + (0 * i)
Writes = 0 + (1 * i)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
i mean µs sigma µs %
1 1.76 0.01 0.5%
20 11.3 0.095 0.8%
39 21.02 0.13 0.6%
58 30.62 0.182 0.5%
77 41.56 0.182 0.4%
96 51.5 0.268 0.5%
115 61.64 0.231 0.3%
134 72.68 0.324 0.4%
153 83.36 0.152 0.1%
172 94.06 1 1.0%
191 105.2 0.202 0.1%
210 113.6 0.529 0.4%
229 124.7 0.273 0.2%
248 136.3 1.553 1.1%
267 145.6 0.25 0.1%
286 156.1 0.836 0.5%
305 165.5 0.416 0.2%
324 177.4 0.372 0.2%
343 188.3 0.491 0.2%
362 199.1 0.812 0.4%
381 209.8 0.669 0.3%
400 219.2 0.504 0.2%
419 232.9 2.252 0.9%
438 242.7 1.236 0.5%
457 253.7 0.877 0.3%
476 265.7 2.248 0.8%
495 275.5 1.133 0.4%
514 285.6 0.798 0.2%
533 300.7 3.238 1.0%
552 308.1 0.595 0.1%
571 324.4 3.136 0.9%
590 330.5 0.867 0.2%
609 341.4 1.345 0.3%
628 351.3 0.894 0.2%
647 361.8 1.317 0.3%
666 375.5 3.16 0.8%
685 387.4 3.346 0.8%
704 397 1.231 0.3%
723 409.4 4.415 1.0%
742 417.9 0.589 0.1%
761 433.7 3.861 0.8%
780 444.2 4.986 1.1%
799 451.8 1.707 0.3%
818 463.4 3.82 0.8%
837 475.3 1.625 0.3%
856 488.2 4.528 0.9%
875 498.5 1.024 0.2%
894 509.1 3.428 0.6%
913 520.6 2.779 0.5%
932 534.1 3.342 0.6%
951 542.2 1.535 0.2%
970 558 6.467 1.1%
989 565.6 1.556 0.2%

Quality and confidence:
param error
i 0

Model:
Time ~= 0
+ i 0.574
µs

Reads = 0 + (0 * i)
Writes = 0 + (1 * i)
Pallet: "frame_system", Extrinsic: "kill_storage", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 0
+ i 0.403
µs

Reads = 0 + (0 * i)
Writes = 0 + (1 * i)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
i mean µs sigma µs %
1 1.724 0.026 1.5%
20 8.458 0.037 0.4%
39 15.3 0.028 0.1%
58 21.97 0.068 0.3%
77 28.92 0.098 0.3%
96 35.51 0.048 0.1%
115 42.86 0.055 0.1%
134 50.46 0.091 0.1%
153 57.2 0.133 0.2%
172 64.58 0.106 0.1%
191 72.19 0.162 0.2%
210 79.66 0.334 0.4%
229 86.61 0.13 0.1%
248 93.72 0.127 0.1%
267 101.4 0.307 0.3%
286 108.6 0.12 0.1%
305 115.3 0.199 0.1%
324 123.4 0.326 0.2%
343 131.3 0.21 0.1%
362 137.9 0.195 0.1%
381 145.5 0.252 0.1%
400 153 0.322 0.2%
419 160.4 0.354 0.2%
438 169 0.243 0.1%
457 177.2 0.355 0.2%
476 183.7 0.3 0.1%
495 191.7 0.415 0.2%
514 198.7 0.236 0.1%
533 208.2 0.244 0.1%
552 214.2 0.565 0.2%
571 221.2 0.655 0.2%
590 230.6 0.589 0.2%
609 238.4 0.847 0.3%
628 245.6 0.365 0.1%
647 253.5 0.304 0.1%
666 261 0.339 0.1%
685 269.2 0.462 0.1%
704 278.1 0.38 0.1%
723 285.9 0.493 0.1%
742 294.8 0.43 0.1%
761 300.6 0.605 0.2%
780 310.1 0.266 0.0%
799 316 0.515 0.1%
818 324.9 0.42 0.1%
837 334.1 0.843 0.2%
856 342.7 0.501 0.1%
875 351.7 0.449 0.1%
894 357.7 0.307 0.0%
913 367.5 1.395 0.3%
932 374.6 1.225 0.3%
951 384.4 0.476 0.1%
970 391.8 0.911 0.2%
989 400.4 0.508 0.1%

Quality and confidence:
param error
i 0

Model:
Time ~= 0
+ i 0.404
µs

Reads = 0 + (0 * i)
Writes = 0 + (1 * i)
Pallet: "frame_system", Extrinsic: "kill_prefix", Lowest values: [], Highest values: [], Steps: [50], Repeat: 20
Median Slopes Analysis

-- Extrinsic Time --

Model:
Time ~= 0
+ p 0.879
µs

Reads = 0 + (0 * p)
Writes = 0 + (1 * p)
Min Squares Analysis

-- Extrinsic Time --

Data points distribution:
p mean µs sigma µs %
1 4.519 0.044 0.9%
20 20.25 0.116 0.5%
39 36.02 0.196 0.5%
58 53.04 0.148 0.2%
77 64.58 0.178 0.2%
96 81.35 0.192 0.2%
115 95.69 0.123 0.1%
134 111 0.132 0.1%
153 128.1 0.278 0.2%
172 146.2 0.212 0.1%
191 161 0.434 0.2%
210 177.6 0.496 0.2%
229 196.8 0.242 0.1%
248 207.5 0.257 0.1%
267 225.8 0.571 0.2%
286 241.2 0.257 0.1%
305 256.5 0.52 0.2%
324 280.5 0.417 0.1%
343 296.1 8.654 2.9%
362 313.3 0.856 0.2%
381 332.9 0.638 0.1%
400 343.1 0.541 0.1%
419 363.5 0.398 0.1%
438 384.6 0.651 0.1%
457 394.6 0.573 0.1%
476 418.1 0.566 0.1%
495 431.4 0.426 0.0%
514 455.7 8.808 1.9%
533 474.5 7.192 1.5%
552 482.1 0.68 0.1%
571 498.7 0.897 0.1%
590 519.8 1.66 0.3%
609 524.7 1.086 0.2%
628 554.8 1.366 0.2%
647 574.8 0.993 0.1%
666 585.6 0.676 0.1%
685 605 0.613 0.1%
704 625.9 0.707 0.1%
723 622.7 1.251 0.2%
742 651.1 1.727 0.2%
761 670 0.629 0.0%
780 682.4 1.258 0.1%
799 697.3 4.417 0.6%
818 712.6 1.915 0.2%
837 730.1 1.517 0.2%
856 752.1 1.517 0.2%
875 762.2 0.998 0.1%
894 777.7 1.073 0.1%
913 796.2 1.59 0.1%
932 812.7 1.407 0.1%
951 833.4 1.704 0.2%
970 853.1 1.687 0.1%
989 856.6 1.565 0.1%

Quality and confidence:
param error
p 0

Model:
Time ~= 0
+ p 0.879
µs

Reads = 0 + (0 * p)
Writes = 0 + (1 * p)

@shawntabrizi shawntabrizi added C1-low PR touches the given topic and has a low impact on builders. B0-silent Changes should not be mentioned in any release notes labels Feb 28, 2021
…n=polkadot-dev --steps=50 --repeat=20 --pallet=frame_system --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/
@shawntabrizi
Copy link
Member Author

I reran the benchmarks and looked at the raw results, the effect of the linear increase on the hash function overtakes any constant weight component. From the eyes of the min squares analysis, a best fit of 0 constant value is right. This should be fine since we add to any weight the "base weight" of a call, so a remark of no bytes will still have a weight, but yeah results are not exactly perfect

@shawntabrizi shawntabrizi deleted the shawntabrizi-new-system-weights branch February 28, 2021 15:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants