-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
ci: Collect CPU usage statistics on Azure #61632
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! I haven't looked through all the platform specific details since it seems great if it works and I don't know much anyway.
src/etc/cpu-usage-over-time.py
Outdated
# https://rust-lang-ci2.s3.amazonaws.com/rustc-builds/68baada19cd5340f05f0db15a3e16d6671609bcc/cpu-x86_64-apple.csv | ||
# | ||
# Each CSV file has two columns. The first is the timestamp of the measurement | ||
# and the second column is the % of idle cpu time in that time slice. Ideally |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I presume this is the total idle % time; could we perhaps get per-thread/vCPU measurements? Fine to leave until later too, of course.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The OSX/Linux implementations have this information, but for Windows we just have total times currently. It's possible to figure this out but afaik it's not all that useful in the sense that I can't think of a meaningful statistic to learn about individual cpus vs them all as an aggregate that we can act on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thought was a distinction between "one thread is doing work" and "all threads are busy, but none are all that active (e.g., network/IO heavy, presumably)". But yeah, I agree that at least initially not all that useful
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Took a glance at the script and it seems fine (why is it in |
410b2dc
to
77a1434
Compare
Good points @pietroalbini, I think those are handled now |
@bors r+ |
📌 Commit 77a1434cb766830277e273afa8b7a9b4089d0e41 has been approved by |
.azure-pipelines/steps/run.yml
Outdated
- bash: aws s3 cp --acl public-read cpu-usage.csv s3://$DEPLOY_BUCKET/rustc-builds/$BUILD_SOURCEVERSION/cpu-$SYSTEM_JOBNAME.csv | ||
env: | ||
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY) | ||
condition: ne(variables['System.PullRequest.IsFork'], 'True') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
condition: ne(variables['System.PullRequest.IsFork'], 'True') | |
condition: contains(variables, 'AWS_SECRET_ACCESS_KEY') |
Can we make this more generic, so that it's automatically enabled or disabled based on the presence of the secret key?
@bors r- due to the above comment. |
This commit adds a script which we'll execute on Azure Pipelines which is intended to run in the background and passively collect CPU usage statistics for our builders. The intention here is that we can use this information over time to diagnose issues with builders, see where we can optimize our build, fix parallelism issues, etc. This might not end up being too useful in the long run but it's data we've wanted to collect for quite some time now, so here's a stab at it! Comments about how this is intended to work can be found in the python script used here to collect CPU usage statistics. Closes rust-lang#48828
77a1434
to
f2c37a5
Compare
@bors: r=pietroalbini |
📌 Commit f2c37a5 has been approved by |
…=pietroalbini ci: Collect CPU usage statistics on Azure This commit adds a script which we'll execute on Azure Pipelines which is intended to run in the background and passively collect CPU usage statistics for our builders. The intention here is that we can use this information over time to diagnose issues with builders, see where we can optimize our build, fix parallelism issues, etc. This might not end up being too useful in the long run but it's data we've wanted to collect for quite some time now, so here's a stab at it! Comments about how this is intended to work can be found in the python script used here to collect CPU usage statistics. Closes rust-lang#48828
Rollup of 9 pull requests Successful merges: - #60187 (Generator optimization: Overlap locals that never have storage live at the same time) - #61348 (Implement Clone::clone_from for Option and Result) - #61568 (Use Symbol, Span in libfmt_macros) - #61632 (ci: Collect CPU usage statistics on Azure) - #61654 (use pattern matching for slices destructuring) - #61671 (implement nth_back for Range(Inclusive)) - #61688 (is_fp and is_floating_point do the same thing, remove the former) - #61705 (Pass cflags rather than cxxflags to LLVM as CMAKE_C_FLAGS) - #61734 (Migrate rust-by-example to MdBook2) Failed merges: r? @ghost
The condition I suggested in rust-lang#61632 was not correct and it errors out while evaluating. This fixes the condition. Example of a failure: https://dev.azure.com/rust-lang/rust/_build/results?buildId=543
ci: fix ci stats upload condition The condition I suggested in #61632 was not correct and it errors out while evaluating. This fixes the condition. [Example of a failure](https://dev.azure.com/rust-lang/rust/_build/results?buildId=543). r? @alexcrichton
…=alexcrichton ci: fix ci stats upload condition The condition I suggested in rust-lang#61632 was not correct and it errors out while evaluating. This fixes the condition. [Example of a failure](https://dev.azure.com/rust-lang/rust/_build/results?buildId=543). r? @alexcrichton
…=alexcrichton ci: fix ci stats upload condition The condition I suggested in rust-lang#61632 was not correct and it errors out while evaluating. This fixes the condition. [Example of a failure](https://dev.azure.com/rust-lang/rust/_build/results?buildId=543). r? @alexcrichton
This commit adds a script which we'll execute on Azure Pipelines which
is intended to run in the background and passively collect CPU usage
statistics for our builders. The intention here is that we can use this
information over time to diagnose issues with builders, see where we can
optimize our build, fix parallelism issues, etc. This might not end up
being too useful in the long run but it's data we've wanted to collect
for quite some time now, so here's a stab at it!
Comments about how this is intended to work can be found in the python
script used here to collect CPU usage statistics.
Closes #48828