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

update weights #5507

Merged
merged 4 commits into from
May 12, 2022
Merged

update weights #5507

merged 4 commits into from
May 12, 2022

Conversation

coderobe
Copy link
Contributor

No description provided.

@coderobe coderobe added A3-in_progress Pull request is in progress. No review needed at this stage. 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. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit. labels May 11, 2022
@coderobe
Copy link
Contributor Author

i tried to use substrate-weight-compare to render a comparison for this but it seems like i can not compile it

@coderobe coderobe marked this pull request as ready for review May 12, 2022 07:31
@github-actions github-actions bot added A0-please_review Pull request needs code review. and removed A3-in_progress Pull request is in progress. No review needed at this stage. labels May 12, 2022
@coderobe coderobe mentioned this pull request May 12, 2022
22 tasks
@coderobe
Copy link
Contributor Author

this will be backported to the release branch once reviewed & merged

@coderobe
Copy link
Contributor Author

I think some block weights got skipped, or at least it appears so looking at the logs

rel:

2022-05-11 19:11:35 👶 Creating empty BABE epoch changes on what appears to be first startup.    
2022-05-11 19:11:35 Essential task `txpool-background` failed. Shutting down service.    
2022-05-11 19:11:35 CurrentBlockRandomness did not provide entropy    
2022-05-11 19:11:36 Running 10 warmups...    
2022-05-11 19:11:36 CurrentBlockRandomness did not provide entropy    
(removed duplicate lines)
Error: 
   0: Extrinsic is not valid: TransactionValidityError::Invalid(InvalidTransaction::BadProof)
   1: Transaction has a bad signature

Copy link
Contributor

@chevdor chevdor left a comment

Choose a reason for hiding this comment

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

The weights in this benchmark run remain, as last time, rather stable.
I documented more small changes than usual to help test some tooling.

Comment on lines +90 to 95
(31_691_000 as Weight)
// Standard Error: 2_000
.saturating_add((513_000 as Weight).saturating_mul(v as Weight))
// Standard Error: 4_000
.saturating_add((71_000 as Weight).saturating_mul(t as Weight))
.saturating_add((517_000 as Weight).saturating_mul(v as Weight))
// Standard Error: 5_000
.saturating_add((56_000 as Weight).saturating_mul(t as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
Copy link
Contributor

Choose a reason for hiding this comment

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

NOTE: x3

Copy link
Member

Choose a reason for hiding this comment

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

Comment on lines +108 to +112
(48_969_000 as Weight)
// Standard Error: 10_000
.saturating_add((1_329_000 as Weight).saturating_mul(a as Weight))
// Standard Error: 16_000
.saturating_add((285_000 as Weight).saturating_mul(d as Weight))
Copy link
Contributor

Choose a reason for hiding this comment

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

NOTE: x2

Copy link
Member

Choose a reason for hiding this comment

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

Comment on lines +151 to 161
fn feasibility_check(v: u32, t: u32, a: u32, d: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 6_000
.saturating_add((1_348_000 as Weight).saturating_mul(v as Weight))
// Standard Error: 12_000
.saturating_add((27_000 as Weight).saturating_mul(t as Weight))
// Standard Error: 20_000
.saturating_add((9_706_000 as Weight).saturating_mul(a as Weight))
// Standard Error: 31_000
.saturating_add((1_214_000 as Weight).saturating_mul(d as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
Copy link
Contributor

Choose a reason for hiding this comment

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

Big decrease down to 0

Comment on lines 64 to 70
fn on_initialize_named_resolved(s: u32, ) -> Weight {
(452_000 as Weight)
(0 as Weight)
// Standard Error: 29_000
.saturating_add((19_512_000 as Weight).saturating_mul(s as Weight))
.saturating_add((20_816_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Copy link
Contributor

Choose a reason for hiding this comment

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

Down to 0

Copy link
Member

Choose a reason for hiding this comment

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

in situations like this, the constant factor is 2 orders of magnitude smaller than the linear factor. So even s = 1 will make this change hardly noticeable.

This is just the result of linear fitting from my view.

Comment on lines 76 to 82
fn on_initialize_periodic_resolved(s: u32, ) -> Weight {
(0 as Weight)
// Standard Error: 30_000
.saturating_add((21_846_000 as Weight).saturating_mul(s as Weight))
(315_000 as Weight)
// Standard Error: 33_000
.saturating_add((23_338_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().reads((3 as Weight).saturating_mul(s as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Copy link
Contributor

Choose a reason for hiding this comment

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

Bumped from 0

Comment on lines 88 to 94
fn on_initialize_resolved(s: u32, ) -> Weight {
(3_196_000 as Weight)
// Standard Error: 25_000
.saturating_add((18_358_000 as Weight).saturating_mul(s as Weight))
(94_000 as Weight)
// Standard Error: 31_000
.saturating_add((19_898_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().reads((2 as Weight).saturating_mul(s as Weight)))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
Copy link
Contributor

Choose a reason for hiding this comment

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

Significant reduction

Comment on lines 71 to 75
fn remove_approval() -> Weight {
(7_600_000 as Weight)
(3_187_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

/ 2

Comment on lines 62 to 66
fn service_overweight() -> Weight {
(18_399_000 as Weight)
(25_646_000 as Weight)
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

x ~2

Comment on lines +89 to +91
(3_124_000 as Weight)
// Standard Error: 25_000
.saturating_add((18_227_000 as Weight).saturating_mul(s as Weight))
Copy link
Contributor

Choose a reason for hiding this comment

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

x2

Comment on lines 45 to 51
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
fn batch(c: u32, ) -> Weight {
(10_504_000 as Weight)
(4_943_000 as Weight)
// Standard Error: 2_000
.saturating_add((4_057_000 as Weight).saturating_mul(c as Weight))
.saturating_add((3_798_000 as Weight).saturating_mul(c as Weight))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

/ 2

}
fn force_batch(c: u32, ) -> Weight {
(12_678_000 as Weight)
(532_000 as Weight)
// Standard Error: 2_000
Copy link
Contributor

Choose a reason for hiding this comment

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

The weight significantly went down

@coderobe
Copy link
Contributor Author

bot merge

@paritytech-processbot paritytech-processbot bot merged commit b677046 into master May 12, 2022
@paritytech-processbot paritytech-processbot bot deleted the coderobe/weights-22-m branch May 12, 2022 10:44
coderobe added a commit that referenced this pull request May 12, 2022
* rococo: update weights

* polkadot: update weights

* kusama: update weights

* westend: update weights
@coderobe coderobe mentioned this pull request May 12, 2022
coderobe added a commit that referenced this pull request May 12, 2022
* rococo: update weights

* polkadot: update weights

* kusama: update weights

* westend: update weights
@shawntabrizi shawntabrizi added B7-runtimenoteworthy and removed B0-silent Changes should not be mentioned in any release notes labels May 13, 2022
@shawntabrizi
Copy link
Member

shawntabrizi commented May 13, 2022

@chevdor @coderobe @ggwpez @crystalin

The ecosystem teams have asked us to mark weight updates as Runtime Noteworthy, since for some of them, it may affect their fee logic.

I know this happens for every release, but I think it should not be such a big deal to add the tag.

I have updated the tag here :)

@chevdor
Copy link
Contributor

chevdor commented May 13, 2022

Please note that we are reporting in this release many more than we usually do. The reason is that @ggwpez is working on a tool to help spotting changes and having a few noticeable changes helps with the debugging.

Most of the "changes" reported in this PR are much smaller than what we usually report, for the reason mentioned above. I don't think this should be more note worthy than other releases. As a matter of fact, the weights in this PR are very close to the previous and this is, with the previous release, probably one of the least significant release in terms of weight changes.

I totally don't mind the label but it would then show up for each release because we do update the weigths (so far) for evey release. The introduction of changes such as paritytech/polkadot-sdk#826 however could help remove the noise and better focus on the real significant changes.

@chevdor
Copy link
Contributor

chevdor commented May 13, 2022

FYI: As it stands now, it is unlikely that we rebuild a new RC before the final (= the current release and release notes look good :)).

That means the new tag would not be picked up as we probably won't generate a new release notes.

I added however the task in #5496 to add the mention manually so it shows up.

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. C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants