Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upFirefox compile time regression #43211
Comments
This comment has been minimized.
This comment has been minimized.
|
Mmmmm with 1.19.0-nightly (75b0568 2017-05-15):
With 1.19.0-nightly (d3abc80 2017-05-09):
There would seem to be different regression points for different things, and early in the 1.19 development, at that (I tried 75b0568 because of range given in #43141 ) Also note that the order in which the mentioned crates are built is webrender, style, geckoservo, gkrust, gkrust_gtest (the last two are interchangeable depending on timing), and are all happening sequentially because, to simplify things, they are a dependency chain (except webrender, which may build in parallel of style, but it's not like it would matter much). Also note that this long tail of builds takes so long that by the time geckoservo starts to build after style, there's only that happening on the build machine (everything C++ that doesn't depend on rust is done), and in fact, style has been the only thing happening on the build machine for a while too... |
sanxiyn
added
the
I-compiletime
label
Jul 13, 2017
This comment has been minimized.
This comment has been minimized.
|
Note, I'm not excluding that as a counterpart, the resulting builds might have better code, but I haven't verified that (and I don't know which specific tests in the Firefox test suites would tell me that about the rust code) |
alexcrichton
added
the
regression-from-stable-to-nightly
label
Jul 13, 2017
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
brson
added
T-compiler
I-nominated
labels
Jul 13, 2017
This comment has been minimized.
This comment has been minimized.
|
P-? |
This comment has been minimized.
This comment has been minimized.
|
It would be interesting to know if turning off LTO makes a difference here. |
This comment has been minimized.
This comment has been minimized.
|
More data points would also be useful -- how hard are they to gather? |
This comment has been minimized.
This comment has been minimized.
|
What kind of data points? Different versions? Different configurations? |
This comment has been minimized.
This comment has been minimized.
|
@glandium Different Rust versions, yes, and if possible, timings for specific passes. |
This comment has been minimized.
This comment has been minimized.
|
Some more questions:
|
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
Thanks, @jdm! Do you know about the other questions? |
This comment has been minimized.
This comment has been minimized.
|
I edited my previous comment to add answers. |
This comment has been minimized.
This comment has been minimized.
|
Thanks, @jdm! I'll try to reproduce those build times locally and collect some data. Will the build system respect |
This comment has been minimized.
This comment has been minimized.
|
I do not know the answer to that, unfortunately. |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
So, I've gathered some data with the latest nightly (
This is with LTO enabled. The full output can be found here: None of these crates spends a lot of time before LLVM. |
This comment has been minimized.
This comment has been minimized.
|
@glandium It's interesting that your timings of |
This comment has been minimized.
This comment has been minimized.
|
Some more data: Turning off LTO makes the compile time of the final crate practically disappear. This is to be expected as that crate is almost empty. The rest stays pretty much unchanged.
|
This comment has been minimized.
This comment has been minimized.
|
Here are my timings with the nightly of the original post (
They don't look quite as bad. |
This comment has been minimized.
This comment has been minimized.
|
Do you have numbers with 1.18? My numbers come from Firefox CI, which happens on Amazon EC2, where the CPUs are Xeons that probably are slower than your CPU? |
This comment has been minimized.
This comment has been minimized.
|
Here are timings with 1.18 stable:
Things are quite a bit slower compared to the latest nightly. But it's not an entirely valid comparison, since nightlies have debug assertions (and maybe even LLVM assertions) enabled in the compiler, so they are expected to be slower. I'll try to find a nightly that roughly corresponds to 1.18 stable, then we'll see how much that accounts for. |
This comment has been minimized.
This comment has been minimized.
|
Rust Nightly does enable LLVM assertions, whereas other channels do not. The impact on compile times is significant, especially when doing optimizations. Rust CI does make builds available without LLVM assertions, but they’re not easy to use: #39754. (More discussion of this: https://internals.rust-lang.org/t/disabling-llvm-assertions-in-nightly-builds/5388) |
This comment has been minimized.
This comment has been minimized.
|
See here are timings from
These times are roughly the same as the current nightly, except for gkrust, where the current nightly spends 31 seconds more in LLVM. The full |
This comment has been minimized.
This comment has been minimized.
|
So, I did some builds with 1.18, 1.19 (now released) and 1.20 beta (presumably without the LLVM asserts). I forced them to be -j1 both for As in the first comment, I'm going to list the times taken by the slowest crates:
So while not as bad as in the first comment, it's not entirely good either. At least 1.19 is not too bad, except, somehow, for clap. |
This comment has been minimized.
This comment has been minimized.
|
https://bugzilla.mozilla.org/show_bug.cgi?id=1382743#c11 suggests something did go bad when upgrading from 1.18 to 1.19. |
This comment has been minimized.
This comment has been minimized.
If the issues are related to the job server then that's quite likely. |
Mark-Simulacrum
added
the
P-high
label
Jul 27, 2017
nikomatsakis
removed
the
I-nominated
label
Jul 27, 2017
nikomatsakis
assigned
michaelwoerister
Jul 27, 2017
Mark-Simulacrum
added
the
C-bug
label
Jul 28, 2017
This comment has been minimized.
This comment has been minimized.
|
1.20 is now beta |
arielb1
added
regression-from-stable-to-beta
and removed
regression-from-stable-to-nightly
labels
Aug 9, 2017
This comment has been minimized.
This comment has been minimized.
|
There appears to be a 5% "unexplained" regression between 1.19 and 1.20. Allocators are the prime suspect - is anyone looking at it? |
This comment has been minimized.
This comment has been minimized.
|
@arielb1 I haven't had much time personally to look into the allocator-related regressions yet. Where'd you find the 5% number from, though? Is there perhaps a suspect commit on perf.rust-lang.org? |
This comment has been minimized.
This comment has been minimized.
|
That's from @glandium's numbers
|
This comment has been minimized.
This comment has been minimized.
|
triage: P-medium Discussed this in the @rust-lang/compiler meeting. We decided to downgrade this to P-medium, since the immediate problem has been resolved, though we will want to revisit (and perhaps upgrade priority again) in the future. |
rust-highfive
added
P-medium
and removed
P-high
labels
Aug 17, 2017
alexcrichton
modified the milestone:
1.20
Aug 23, 2017
alexcrichton
added
regression-from-stable-to-stable
and removed
regression-from-stable-to-beta
labels
Aug 28, 2017
This comment has been minimized.
This comment has been minimized.
|
1.20 will soon be stable |
michaelwoerister
removed their assignment
Oct 31, 2017
This comment has been minimized.
This comment has been minimized.
|
Heya ! |
glandium commentedJul 13, 2017
•
edited
Preliminary note: this may or may not be related to #43141, but just in case, I file this separately instead of piling up there.
I'm sorry I don't have much more fine-grained data at the moment, but -Ztime-passes, when multiple things are built in parallel (while building Firefox), is not entirely helpful, because it doesn't tell to which crate the interleaving numbers belong to.
Rust build times on Firefox are already bad with 1.18. Some of the most time consuming crates have build times that look like the following:
With the latest nightly as of writing (1.20.0-nightly (f85579d 2017-07-12)), those times become:
I'm trying to narrow it down to older nightlies, but it started badly, because I got an ICE building the style crate on the last 1.18.0 nightly (2017-04-29)
Those are times for --release with lto enabled (I have a separate bug to file about lto, but I don't think that's relevant to this regression).
CC: @froydnj, @rillian