[SERVER-21336] Should be possible to use CacheDir and the MD5-Timestamp Decider together Created: 06/Nov/15 Updated: 21/Mar/19 Resolved: 13/Nov/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | bdbaddog#1 |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Sprint: | Platforms 2017-04-17, Platforms 2017-05-08, Platforms 2017-05-29, Platforms 2018-06-04, Platforms 2018-06-18, Platforms 2018-07-02, Platforms 2018-07-16, Platforms 2018-07-30, Platforms 2018-08-13, Platforms 2018-08-27, Platforms 2018-09-10, Dev Tools 2018-10-08, Dev Tools 2018-10-22, Dev Tools 2018-11-05, Dev Tools 2018-11-19 | ||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Description |
|
Currently impossible due to http://scons.tigris.org/issues/show_bug.cgi?id=2980, this ticket is here to track progress on resolving the upstream ticket. The practical effect of this is that if you want to use CacheDir, you need to use more expensive up-to-date detection, removing some of the win of the cache. |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 25/Jan/19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I forgot to add my conclusions:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 25/Jan/19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
We upgraded to SCons 3.0.4 yesterday, so I re-ran these tests:
The following script was used:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 13/Nov/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The fix for this was merged into upstream SCons: https://github.com/SCons/scons/pull/3112 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by bdbaddog#1 [ 30/Aug/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Results from perf rerun with fixed patch. (scons_2980_timestamp_md5_fix 10f201c099894fd6ae7139b4a9f0c9982c4655e1) ( https://github.com/bdbaddog/mongo/commit/10f201c099894fd6ae7139b4a9f0c9982c4655e1 )
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 02/Aug/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I re-tested the latest (from commit 53348e50b8ef6359503c48d838fce28c29c20ad6) I did a quick test of the r3.7.1, r3.7.2, r3.7.1 sequence from above, with good results: the third build was pure cache extraction with no rebuilds. But it seemed very slow. So I made a variant of the script from May 4th above to test it out. Here, the branch {scons_2980_timestamp_md5_fix}is checked out to the above commit.
The filenames give a good indication of the meaning of each build, but basically we are testing the build performance of each of an initial build, a no-op rebuild, and a pull from cache rebuild as we permute among the base commit vs the patch, build-fast-and-loose off and on, and whether or not the cache is enabled. On my workstation, we get the following timings:
Interesting observations:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 04/May/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
It seems likely that the fix for this issue may have also resolved | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 04/May/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Where the gist above is on the branch bd-scons-deps-fix. We find the following build timings:
From this, we can draw the following conclusions:
Overall, this is still a good outcome: while the overall scan is a little slower, we gain back more time than we give up. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 04/May/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I've just confirmed that after locally applying https://gist.github.com/bdbaddog/9bb70b7e1e440f43984c68d1a2f6928f, the the re-compilations on the third build no longer occur. The third build is entirely an extraction from cache. I will follow up with some performance numbers I gathered yesterday, but it looks like we have a path towards resolving this longstanding issue. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 04/May/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
bdbaddog - I'm just documenting the repro steps for the known issue, and then I'm going to update with the link to the gist with the fix. More just ensuring that we can find this info from the ticket, rather than private email discussion. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 04/May/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Reproduction steps:
The third build should be entirely cache extraction, however, sometimes we see files get rebuilt, like this:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by bdbaddog#1 [ 02/Apr/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Any luck with a reproducer from your source tree? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by bdbaddog#1 [ 23/Mar/18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Updating link to referenced bug to point at github as tigris' bugtracker is no longer the official bugtracker of SCons project. |