GithubHelp home page GithubHelp logo

facebookexperimental / resctl-demo Goto Github PK

View Code? Open in Web Editor NEW
141.0 141.0 31.0 3.17 MB

Demonstrate and benchmark various features of Linux resource control in a self-contained package.

Home Page: https://facebookmicrosites.github.io/resctl-demo-website/

License: Apache License 2.0

Shell 0.12% Python 5.65% Rust 83.53% R 10.71%
containerization linux resource-controller

resctl-demo's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

resctl-demo's Issues

resctl-bench does not support dm devices

resctl-bench doesn't seem to support dm devices, and fails with an unclear error when one is used. For example, on a Fedora system using full disk encryption with LUKS under btrfs (thanks @michel-slm for the repro):

❯ resctl-bench --result /tmp/resctl.log
[WARN] storage_info: Failed to read model string for "/sys/block/dm-0" (No such file or directory (os error 2))
[WARN] storage_info: Failed to read firmware revision for "/sys/block/dm-0" (neither "firmware_dev" or "rev" is found)
[ERROR] Failed to restore io.cost.model,qos (Permission denied (os error 13))

~ 
❯ sudo resctl-bench --result /tmp/resctl.log
[sudo] password for michel: 
[WARN] storage_info: Failed to read model string for "/sys/block/dm-0" (No such file or directory (os error 2))
[WARN] storage_info: Failed to read firmware revision for "/sys/block/dm-0" (neither "firmware_dev" or "rev" is found)

~ took 4s 
❯ cat /tmp/systemd-private-b03f9169e1554f5c9d9fedcdd3ed2092-systemd-resolved.service-VgYlRC/

~ 
❯ cat /tmp/resctl.log    
cat: /tmp/resctl.log: No such file or directory

Not sure if this is something we can/want to support, but the error message should be clarified.

Use preinstalled kernel tarball if available

If --linux-tar is not set and /usr/share/resctl-demo/linux.tar exists we should use that instead of downloading; if it doesn't, but /usr/share/resctl-demo/linux.tar.xz exists we should use that (after decompressing it); if neither exist we should download as we currently do.

resctl-bench: test test_bench_iocost_tune_datasel_sort_and_group is broken

looks like this test is calling a missing function DataSel::sort_and_group:

$ cargo test
warning: function is never used: `test_transient_service`
   --> util/src/systemd.rs:840:8
    |
840 |     fn test_transient_service() {
    |        ^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

warning: 1 warning emitted

   Compiling resctl-bench v0.1.0 (/home/obbardc/projects/fac0008/resctl-demo/resctl-bench)
error[E0599]: no variant or associated item named `sort_and_group` found for enum `iocost_tune::DataSel` in the current scope
    --> resctl-bench/src/bench/iocost_tune.rs:1665:32
     |
19   | enum DataSel {
     | ------------ variant or associated item `sort_and_group` not found here
...
1665 |         let grouped = DataSel::sort_and_group(sels);
     |                                ^^^^^^^^^^^^^^ variant or associated item not found in `iocost_tune::DataSel`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `resctl-bench`

resctl-bench: can't build PDF on debian

I installed the adobe fonts following https://gist.github.com/marcora/cb37b2432c072e8e9d77 but there's still an error on latest Debian:

$ ./resctl-bench --result=out.json format iocost-tune:pdf=output.pdf
convert-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/421.
[ERROR] Failed to format job[iocost-tune:-]: "\"convert\" \"-font\" \"Source-Code-Pro\" \"-pointsize\" \"7\" \"-density\" \"300\" \"text:/tmp/.tmp4hy4Mn/iocost-tune-cover.txt\" \"/tmp/.tmp4hy4Mn/iocost-tune-cover.pdf\"" (ExitStatus(ExitStatus(256))): are imagemagick and adobe-source-code-pro font available?
thread 'main' panicked at 'explicit panic', resctl-bench/src/main.rs:226:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

running with ghostscript 9.54.0

Update cursive crates

Update cursive to 0.16, cursive-tabs to 0.6, cursive_buffered_backend to 0.5; this is needed for the Fedora packaging.

Can't build/install resctl-demo on Ubuntu 22.04.3 LTS. Hit ahash version issue.

I am trying to get resctl-demo, but I am having troubles installing resctl-demo. I am new to cargo and rust. I am running on Ubuntu 22.04.3 LTS

I run "cargo build --release" OK , but when I get to the following step I get the ahash version failure and can't figure out how to get past it:
$ cargo install --path resctl-demo
Installing resctl-demo v2.2.4 (/work/resctl-demo/resctl-demo)
Updating crates.io index
error: failed to compile resctl-demo v2.2.4 (/work/resctl-demo/resctl-demo), intermediate artifacts can be found at /work/resctl-demo/target

Caused by:
failed to select a version for the requirement ahash = "^0.6"
candidate versions found which didn't match: 0.8.7, 0.8.6, 0.8.5, ...
location searched: crates.io index
required by package cursive v0.16.0
... which satisfies dependency cursive = "^0.16" of package resctl-demo v2.2.4 (/work/resctl-demo/resctl-demo)
perhaps a crate was updated and forgotten to be re-vendored?
resctl-demo had the same complaint, but I was able to get around it by running:
$ cargo add [email protected] --package resctl-demo
I have tried searching with google, but all the suggested solutions have not worked for me.

cargo build --release

cargo install --path rd-hashd
cargo install --path rd-agent
cargo install --path resctl-demo <-- only having the ahash issue with this step
cargo install --path resctl-bench

Tried the following, but cargo build fails.
#300

$ git diff
diff --git a/resctl-demo/Cargo.toml b/resctl-demo/Cargo.toml
index b6b0a07..1413bf9 100644
--- a/resctl-demo/Cargo.toml
+++ b/resctl-demo/Cargo.toml
@@ -20,7 +20,7 @@ anyhow = "1.0"
chrono = { version = "0.4", features = ["serde"] }
clap = "2.33"
crossbeam = "0.8"
-cursive = { version = "0.16", default-features = false, features = ["termion"] }
+cursive = { version = "0.20", default-features = false, features = ["termion"] }
cursive_buffered_backend = "0.5"
cursive-tabs = "0.6"
enum-iterator = "0.7"

$ cargo build --release
Updating crates.io index
Compiling autocfg v1.1.0
Compiling libc v0.2.148
Compiling proc-macro2 v1.0.67
Compiling unicode-ident v1.0.12
Compiling cfg-if v1.0.0
Compiling syn v1.0.109
Compiling libm v0.2.7
Compiling version_check v0.9.4
Compiling log v0.4.18
Compiling serde v1.0.188
...
Compiling resctl-demo v2.2.4 (/work/senpai/resctl-demo/resctl-demo)
Compiling rd-agent v2.2.4 (/work/senpai/resctl-demo/rd-agent)
error[E0277]: the trait bound TabView: ViewWrapper is not satisfied
--> resctl-demo/src/graph.rs:86:9
|
86 | siv.call_on_name("graph-tabs", |v: &mut TabView| {
| ^^^^^^^^^^^^ the trait ViewWrapper is not implemented for TabView
|
= help: the following other types implement trait ViewWrapper:
BoxedView
CircularFocus
EnableableView
FocusTracker
HideableView
LastSizeView
NamedView
OnEventView
and 9 others
= note: required for TabView to implement cursive::View
note: required by a bound in Cursive::call_on_name
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.3.7/src/cursive.rs:556:12
|
550 | pub fn call_on_name<V, F, R>(
| ------------ required by a bound in this associated function
...
556 | V: View,
| ^^^^ required by this bound in Cursive::call_on_name

error[E0308]: mismatched types
--> resctl-demo/src/graph.rs:923:17
|
922 | tabs.add_tab(
| ------- arguments to this method are incorrect
923 | / LinearLayout::vertical()
924 | | .child(graph_tab_title(0))
925 | | .child(
926 | | horiz_or_vert()
... |
934 | | )
935 | | .with_name(graph_tab_id(0)),
| |_______________________________________________^ expected NamedView<_>, found NamedView<LinearLayout>
|
= note: NamedView<LinearLayout> and NamedView<_> have similar names, but are actually distinct types
note: NamedView<LinearLayout> is defined in crate cursive_core
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.3.7/src/views/named_view.rs:15:1
|
15 | pub struct NamedView {
| ^^^^^^^^^^^^^^^^^^^^^^^
note: NamedView<_> is defined in crate cursive_core
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.2.2/src/views/named_view.rs:15:1
|
15 | pub struct NamedView {
| ^^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate cursive_core are being used?
note: method defined here
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive-tabs-0.6.0/src/lib.rs:164:12
|
164 | pub fn add_tab<T: View>(&mut self, view: NamedView) {
| ^^^^^^^

error[E0308]: mismatched types
--> resctl-demo/src/graph.rs:938:17
|
937 | tabs.add_tab(
| ------- arguments to this method are incorrect
938 | / LinearLayout::vertical()
939 | | .child(graph_tab_title(1))
940 | | .child(
941 | | horiz_or_vert()
... |
949 | | )
950 | | .with_name(graph_tab_id(1)),
| |_______________________________________________^ expected NamedView<_>, found NamedView<LinearLayout>
|
= note: NamedView<LinearLayout> and NamedView<_> have similar names, but are actually distinct types
note: NamedView<LinearLayout> is defined in crate cursive_core
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.3.7/src/views/named_view.rs:15:1
|
15 | pub struct NamedView {
| ^^^^^^^^^^^^^^^^^^^^^^^
note: NamedView<_> is defined in crate cursive_core
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.2.2/src/views/named_view.rs:15:1
|
15 | pub struct NamedView {
| ^^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate cursive_core are being used?
note: method defined here
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive-tabs-0.6.0/src/lib.rs:164:12
|
164 | pub fn add_tab<T: View>(&mut self, view: NamedView) {
| ^^^^^^^

error[E0308]: mismatched types
--> resctl-demo/src/graph.rs:953:17
|
952 | tabs.add_tab(
| ------- arguments to this method are incorrect
953 | / LinearLayout::vertical()
954 | | .child(graph_tab_title(2))
955 | | .child(
956 | | horiz_or_vert()
... |
964 | | )
965 | | .with_name(graph_tab_id(2)),
| |_______________________________________________^ expected NamedView<_>, found NamedView<LinearLayout>
|
= note: NamedView<LinearLayout> and NamedView<_> have similar names, but are actually distinct types
note: NamedView<LinearLayout> is defined in crate cursive_core
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.3.7/src/views/named_view.rs:15:1
|
15 | pub struct NamedView {
| ^^^^^^^^^^^^^^^^^^^^^^^
note: NamedView<_> is defined in crate cursive_core
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.2.2/src/views/named_view.rs:15:1
|
15 | pub struct NamedView {
| ^^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate cursive_core are being used?
note: method defined here
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive-tabs-0.6.0/src/lib.rs:164:12
|
164 | pub fn add_tab<T: View>(&mut self, view: NamedView) {
| ^^^^^^^

error[E0308]: mismatched types
--> resctl-demo/src/graph.rs:968:17
|
967 | tabs.add_tab(
| ------- arguments to this method are incorrect
968 | / LinearLayout::vertical()
969 | | .child(graph_tab_title(3))
970 | | .child(
971 | | horiz_or_vert()
... |
979 | | )
980 | | .with_name(graph_tab_id(3)),
| |_______________________________________________^ expected NamedView<_>, found NamedView<LinearLayout>
|
= note: NamedView<LinearLayout> and NamedView<_> have similar names, but are actually distinct types
note: NamedView<LinearLayout> is defined in crate cursive_core
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.3.7/src/views/named_view.rs:15:1
|
15 | pub struct NamedView {
| ^^^^^^^^^^^^^^^^^^^^^^^
note: NamedView<_> is defined in crate cursive_core
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_core-0.2.2/src/views/named_view.rs:15:1
|
15 | pub struct NamedView {
| ^^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate cursive_core are being used?
note: method defined here
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive-tabs-0.6.0/src/lib.rs:164:12
|
164 | pub fn add_tab<T: View>(&mut self, view: NamedView) {
| ^^^^^^^

error[E0599]: the method with_name exists for struct TabView, but its trait bounds were not satisfied
--> resctl-demo/src/graph.rs:996:33
|
996 | .child(tabs.with_name("graph-tabs"))
| ^^^^^^^^^
|
::: /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive-tabs-0.6.0/src/lib.rs:58:1
|
58 | pub struct TabView {
| ------------------
| |
| doesn't satisfy TabView: Nameable
| doesn't satisfy TabView: cursive::View
|
= note: the following trait bounds were not satisfied:
TabView: cursive::View
which is required by TabView: Nameable
&TabView: cursive::View
which is required by &TabView: Nameable
&mut TabView: cursive::View
which is required by &mut TabView: Nameable
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a use for it:
|
2 + use cursive_core::view::nameable::Nameable;
|

error[E0308]: mismatched types
--> resctl-demo/src/main.rs:622:13
|
621 | Box::new(cursive_buffered_backend::BufferedBackend::new(
| ---------------------------------------------- arguments to this function are incorrect
622 | termion_backend,
| ^^^^^^^^^^^^^^^ expected trait cursive_core::backend::Backend, found trait cursive::backend::Backend
|
= note: expected struct Box<(dyn cursive_core::backend::Backend + 'static)>
found struct Box<dyn cursive::backend::Backend>
= note: perhaps two different versions of crate cursive_core are being used?
note: associated function defined here
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive_buffered_backend-0.5.0/src/lib.rs:90:12
|
90 | pub fn new(backend: Box) -> Self {
| ^^^

error[E0277]: the trait bound BufferedBackend: cursive::backend::Backend is not satisfied
--> resctl-demo/src/main.rs:621:9
|
621 | / Box::new(cursive_buffered_backend::BufferedBackend::new(
622 | | termion_backend,
623 | | ))
| |__________^ the trait cursive::backend::Backend is not implemented for BufferedBackend
|
= help: the following other types implement trait cursive::backend::Backend:
cursive::backends::puppet::Backend
cursive::backends::termion::Backend
Dummy
= note: required for the cast from Box<BufferedBackend> to Box<(dyn cursive::backend::Backend + 'static)>

Some errors have detailed explanations: E0277, E0308, E0599.
For more information about an error, try rustc --explain E0277.
error: could not compile resctl-demo (bin "resctl-demo") due to 8 previous errors
warning: build failed, waiting for other jobs to finish...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.