-
Notifications
You must be signed in to change notification settings - Fork 1k
Tracking/limiting memory allocator #1192
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
Merged
Merged
Changes from 35 commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
47ecf58
Import changes from archived repo
s0me0ne-unkn0wn 58330de
Fix dependencies
s0me0ne-unkn0wn aac1da6
Merge branch 'master' into s0me0ne/tracking-allocator
pepoviola 99d4f5e
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn 18ef342
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn facd26a
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn 3d2146a
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn 6ee5ff3
Format manifests
s0me0ne-unkn0wn f85c753
Make peak allocation value observable
s0me0ne-unkn0wn c9c0bf8
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn edfa2e1
Enforce memory limits
s0me0ne-unkn0wn ac5dab4
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn 994273a
Fix the node allocator declaration
s0me0ne-unkn0wn 72ded39
`cargo fmt`
s0me0ne-unkn0wn dfa0daf
Implement abort handler
s0me0ne-unkn0wn e740b5c
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn 48cde3e
Address some discussions
s0me0ne-unkn0wn acf149e
Remove feature gate
s0me0ne-unkn0wn 6cfeceb
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn c7fa464
Update crate description
s0me0ne-unkn0wn edeb901
Implement failure callback
s0me0ne-unkn0wn 251ac90
Merge remote-tracking branch 'origin/s0me0ne/tracking-allocator' into…
s0me0ne-unkn0wn 4195806
Address discussions
s0me0ne-unkn0wn 09e5c07
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn 02ad536
Fix tests
s0me0ne-unkn0wn e1a2b63
Fix typo
s0me0ne-unkn0wn 1918d2a
Address discussions
s0me0ne-unkn0wn b06cb6d
Merge remote-tracking branch 'origin/s0me0ne/tracking-allocator' into…
s0me0ne-unkn0wn 39cf3b7
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn 007054a
Address discussions
s0me0ne-unkn0wn c81e8aa
Try to fix test pipeline
s0me0ne-unkn0wn 5920260
Fix PVF preparation benchmark
s0me0ne-unkn0wn a37c688
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn 96d71c9
Minor fixes
s0me0ne-unkn0wn 30e5236
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn 73799fb
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn 93b9d61
Eliminate redundant branch
s0me0ne-unkn0wn 8485741
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn 7a3875a
Revert "Eliminate redundant branch"
s0me0ne-unkn0wn 83e6b99
Remove redundant todo comment
s0me0ne-unkn0wn 6c6afc8
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn 9de0856
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn d6470c5
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn d2d8a60
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn d74aa20
Remove stale file
s0me0ne-unkn0wn fb40a0d
Merge branch 's0me0ne/tracking-allocator' of github.com:paritytech/po…
s0me0ne-unkn0wn 9c1d920
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn c6be92b
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn 8c58a68
Abstract `Spinlock`
s0me0ne-unkn0wn 52578ee
Merge branch 'master' into s0me0ne/tracking-allocator
s0me0ne-unkn0wn 778513c
Update comment
s0me0ne-unkn0wn 9c3ea9b
Add safety comment
s0me0ne-unkn0wn 54686a1
Fix comment formatting
s0me0ne-unkn0wn 07eb6a9
Fix typo
s0me0ne-unkn0wn e3ca3b6
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn 8be6359
Remove unneeded trait bound
s0me0ne-unkn0wn 8b0a722
Remove stale file
s0me0ne-unkn0wn 331ed01
Rename tracking fn
s0me0ne-unkn0wn 7d69a9b
Merge remote-tracking branch 'origin/master' into s0me0ne/tracking-al…
s0me0ne-unkn0wn 10e7443
Fix clippy and tests
s0me0ne-unkn0wn c3b66f2
Merge branch 'master' into s0me0ne/tracking-allocator
s0me0ne-unkn0wn e94ddf9
Merge branch 'master' into s0me0ne/tracking-allocator
s0me0ne-unkn0wn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
polkadot/node/core/pvf/prepare-worker/benches/prepare_kusama_runtime.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// Copyright (C) Parity Technologies (UK) Ltd. | ||
// This file is part of Polkadot. | ||
|
||
// Polkadot is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// Polkadot is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
use criterion::{criterion_group, criterion_main, Criterion, SamplingMode}; | ||
use polkadot_node_core_pvf_common::{ | ||
executor_intf::{prepare, prevalidate}, | ||
prepare::PrepareJobKind, | ||
pvf::PvfPrepData, | ||
}; | ||
use polkadot_primitives::ExecutorParams; | ||
use std::time::Duration; | ||
|
||
fn do_prepare_runtime(pvf: PvfPrepData) { | ||
let blob = match prevalidate(&pvf.code()) { | ||
Err(err) => panic!("{:?}", err), | ||
Ok(b) => b, | ||
}; | ||
|
||
match prepare(blob, &pvf.executor_params()) { | ||
Ok(_) => (), | ||
Err(err) => panic!("{:?}", err), | ||
} | ||
} | ||
|
||
fn prepare_kusama_runtime(c: &mut Criterion) { | ||
let blob = staging_kusama_runtime::WASM_BINARY.unwrap(); | ||
let pvf = match sp_maybe_compressed_blob::decompress(&blob, 64 * 1024 * 1024) { | ||
Ok(code) => PvfPrepData::from_code( | ||
code.into_owned(), | ||
ExecutorParams::default(), | ||
Duration::from_secs(360), | ||
PrepareJobKind::Compilation, | ||
), | ||
Err(e) => { | ||
panic!("Cannot decompress blob: {:?}", e); | ||
}, | ||
}; | ||
|
||
let mut group = c.benchmark_group("kusama"); | ||
group.sampling_mode(SamplingMode::Flat); | ||
group.sample_size(20); | ||
group.measurement_time(Duration::from_secs(240)); | ||
group.bench_function("prepare Kusama runtime", |b| { | ||
// `PvfPrepData` is designed to be cheap to clone, so cloning shouldn't affect the | ||
// benchmark accuracy | ||
b.iter(|| do_prepare_runtime(pvf.clone())) | ||
}); | ||
group.finish(); | ||
} | ||
|
||
criterion_group!(preparation, prepare_kusama_runtime); | ||
criterion_main!(preparation); |
42 changes: 0 additions & 42 deletions
42
polkadot/node/core/pvf/prepare-worker/src/executor_intf.rs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.