-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 OSX build time very slow #6239
Comments
Ah, on July 31 Travis changed the default OS X image: https://blog.travis-ci.com/2018-07-19-xcode9-4-default-announce I wonder how that would have had such a large impact. |
Oh dear thanks for investigating this! I'm not really sure what may have changed, but the image update definitely sounds suspicious. I wonder if that was the time that it switched to APFS as well for a filesystem? Maybe we're doing something that's heavily non-optimized there? |
I don't have any good news, yet. I have seen some things that I don't yet understand.
I'm running low on ideas. I'm thinking of doing some more fine-grained timing tests. Let me know if you have any other ideas. |
To confirm, you mean APFS? I've not noticed any slowdown locally myself, so this mostly have to do with Travis's configuration of macs maybe? It does seem related to APFS for sure... Beyond that though I don't know what would cause this :( |
No, HFS. From mount:
And I wrote a little Python script to verify the mtime behavior. And it's documented as HFS at https://docs.travis-ci.com/user/reference/osx/#file-system and https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system. |
Oh dear if that's the case then I definitely don't know what's going on! I think travis does have limited support for ssh'ing into a build, so perhaps their support can be emailed to see if they can help out? |
Update: I'm pretty sure it is unrelated to rust, cargo, or our testsuite. I've been running some benchmarks, and the CPU performance seems to be significantly slower on the 10.13 images. Do you think it would be more effective to contact support via email, or to file an issue on github? Or maybe try something else? |
I don't necessarily have a lot of luck with either, but I've had somewhat more luck personally with the support email. Feel free to cc me on the email too! |
Let me know if there's anything you want to try in the meantime. Some ideas:
|
Given that it seems nothing can land right now it does seem prudent yeah to try something out at least! I think it's fine to disable the cross-test (we should probably just whitelist Linux as doing those) and otherwise I'd ideally advocate for switching back to Do you have an idea if there are some tests taking much longer than others? |
Unfortunately most of the tests take about the same amount of time. The only outliers are the resolve tests. A very rough estimate of how long the top 5 modules take on travis (estimating that travis is ~4 times slower than my local system):
The vast majority of Removing the cross-compile tests saves less time than I thought (around 15-20 seconds). |
Bah :( It may be best for now to switch back to xcode9.2 and just ignore all the failing tests |
I can scale back the resolve tests if that will fix things. (Ether in general or just on the one platform.) Witch 4 art the big ones? Just a guess but:
did I guess correctly? |
Here are the top 4:
Turning them off should save about 4 minutes, so that might allow it to squeak by, but it still might time out occasionally depending on what mood Travis is in. The check to disable I've been using in some of my experiments is |
Fix slow MacOS Travis issue. OS X 10.13 images on Travis are running very slow and causing timeouts. This PR does two things: - Use OS X 10.12 (`xode9.2`) which is much faster. - Implement a change to the testsuite to handle 1-second resolution mtimes on HFS. When a test executes cargo multiple times, and the first run finishes in under 1 second, the second one will think it needs to rebuild because the mtime of the files equals the mtime of the output. This change forces the mtime of every project to be created 1 second in the past. Tests that are still sensitive to mtimes are adjusted on a case-by-case basis. Closes #6239, Closes #5940
The OSX job on Travis seems to be getting significantly slower over time, and has been getting timed out recently.
I charted the time of the OSX job for the past 1000 builds: https://docs.google.com/spreadsheets/d/1BKJNq3bc8NDb5Q-bkRAQOTIaYVbgBejPsm4owDqkYeo/edit?usp=sharing
There is a huge jump starting about 3 months ago: https://travis-ci.org/rust-lang/cargo/builds/410508080 I don't think that PR is responsible, I tested before and after and there was no measurable time difference.
I'm wondering if something has changed with Travis's OSX setup. @alexcrichton do you have any insight? I can continue to investigate if not.
The text was updated successfully, but these errors were encountered: