Skip to content
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

travis: print some statistics from "top". #48841

Closed
wants to merge 1 commit into from

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Mar 8, 2018

cc #48828

@matthiaskrgr matthiaskrgr force-pushed the travis_top branch 3 times, most recently from d0f30d4 to 02ab63c Compare March 8, 2018 12:06
@kennytm kennytm added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 8, 2018
@matthiaskrgr
Copy link
Member Author

matthiaskrgr commented Mar 8, 2018

First results: https://gist.github.com/matthiaskrgr/7ab3c5998dc6943069927683e3a26a2e
There seem to be a bunch of times where it looks like only one core is used (indicating by falling load average).
I modified the script to also print directly into stdout so we can easily see what is happening in the foreground.
https://travis-ci.org/rust-lang/rust/builds/350827434

@ishitatsuyuki
Copy link
Contributor

The thing you mentioned is caused by large, build-blocking crates like libsyntax_ext or librustc. Most of the time is spent doing codegen, and as long as we don't use codegen-units for release build, there is not really a way to resolve this issue.

@matthiaskrgr
Copy link
Member Author

If the purpose of stage0 is solely to bootstrap stage1, maybe we can compile stage0 with several codegen units?

@ishitatsuyuki
Copy link
Contributor

Maybe it works. The best way is to open a PoC PR and check the time difference.

@matthiaskrgr
Copy link
Member Author

I tried to make this work in #48843 , let's see if it works...

… ci.

Currently commented out, can be commented in in .travis.yml if needed.
@matthiaskrgr matthiaskrgr changed the title [test]: travis: print some statistics from "top". travis: print some statistics from "top". Mar 9, 2018
@matthiaskrgr
Copy link
Member Author

I updated the commit so that the .travis.yml line that enables the logging is commented out.
Remove the "#" to enable it.

@shepmaster shepmaster added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 18, 2018
@shepmaster
Copy link
Member

I think this wants to be merged now...

r? @kennytm

@kennytm
Copy link
Member

kennytm commented Mar 18, 2018

cc @alexcrichton @rust-lang/infra #48828. This PR implements a very simple script which polls top every 30 seconds to obtain a (1-minute) load-average time graph plus other information. The script is disabled so we will need to enable it and figure out where to upload the script afterwards.

We've got some data out of it in #48841 (comment).

Personally I incline to close this, because

  1. I think load average is not the metric we want to gather. I expect something more like the CPU usage graph in the Task Manager, with a percentage per core.

  2. This output does not show which step are we in. Perhaps we could analyze together with ci: Print out how long each step takes on CI #49094, though ci: Print out how long each step takes on CI #49094 will need to mark the starting point of each step as well, to make parsing easier.

  3. The script is disabled here, so merging it at this state won't have any effect anyway.

(BTW, top -ibn 1 is not a valid command on macOS. I suggest you use uptime instead if we only care about the load average. Also I'm not sure if top/uptime exists on AppVeyor.

invalid interval number (not an integer): bn
top usage: top
		[-a | -d | -e | -c <mode>]
		[-F | -f]
		[-h]
		[-i <interval>]
		[-l <samples>]
		[-ncols <columns>]
		[-o <key>] [-O <secondaryKey>]
			keys: pid (default), command, cpu, cpu_me, cpu_others, csw,
				time, threads, ports, mregion, mem, rprvt, purg, vsize, vprvt,
				kprvt, kshrd, pgrp, ppid, state, uid, wq, faults, cow, user,
				msgsent, msgrecv, sysbsd, sysmach, pageins, boosts, instrs, cycles
		[-R | -r]
		[-S]
		[-s <delay>]
		[-n <nprocs>]
		[-stats <key(s)>]
		[-pid <processid>]
		[-user <username>]
		[-U <username>]
		[-u]

)

@alexcrichton
Copy link
Member

@kennytm I agree with everything you said, I'll continue with some more thoughts on #48828

@kennytm
Copy link
Member

kennytm commented Mar 22, 2018

As discussed above, I'm closing this PR. Thanks for the exploration @matthiaskrgr!

@kennytm kennytm closed this Mar 22, 2018
@matthiaskrgr matthiaskrgr deleted the travis_top branch August 28, 2018 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants