-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Firefox compile time regression #43211
Comments
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... |
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) |
cc @rust-lang/compiler |
P-? |
It would be interesting to know if turning off LTO makes a difference here. |
More data points would also be useful -- how hard are they to gather? |
What kind of data points? Different versions? Different configurations? |
@glandium Different Rust versions, yes, and if possible, timings for specific passes. |
Some more questions:
|
|
Thanks, @jdm! Do you know about the other questions? |
I edited my previous comment to add answers. |
Thanks, @jdm! I'll try to reproduce those build times locally and collect some data. Will the build system respect |
I do not know the answer to that, unfortunately. |
|
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. |
@glandium It's interesting that your timings of |
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.
|
Here are my timings with the nightly of the original post (
They don't look quite as bad. |
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? |
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. |
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) |
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 |
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. |
https://bugzilla.mozilla.org/show_bug.cgi?id=1382743#c11 suggests something did go bad when upgrading from 1.18 to 1.19. |
If the issues are related to the job server then that's quite likely. |
1.20 is now beta |
There appears to be a 5% "unexplained" regression between 1.19 and 1.20. Allocators are the prime suspect - is anyone looking at it? |
@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? |
That's from @glandium's numbers
|
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. |
1.20 will soon be stable |
Heya ! |
Triage: No one said it did not help, so let's assume it did! Closing. |
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
The text was updated successfully, but these errors were encountered: