Here's a little brain dump about speeding up builds.
I ran into two problems today:
- disk slowness On a machine where builds were slow, the iozone benchmark showed I/O was half or two thirds as fast as a better machine. The slow system turned out to be ext3, whereas the fast ones were ext4. (It's also using gcc-2.95.3 for wine, whereas the others are using the system compiler.) Adding a 7200rpm disk with an ext4 filesystem, and putting both wine-git and ~/.ccache on it, sped up ./configure so that it matched the faster system... but builds were only sped up by 20%. Nice, but not sufficient.
- ccache too strict? ccache helps hugely on most of my systems without any tuning, but wasn't working well on my slow system. After looking at ccache's statistics and log file for a while, I came across the CCACHE_SLOPPINESS environment variable; setting that to maximum sloppiness got the cache hit rate sky-high, and build times dropped by a factor of 2, making the slower box suddenly competitive with the faster system. The sloppy setting is probably inappropriate for general use, but ok for regression testing.
Those two tweaks get the buildbot cycle time for the headless subset of tests with gcc-2.95 on my e7300 down under nine minutes, yay.
Two more things: - ccache's cache size matters. If ccache -s shows the cache is full after two builds, try raising it. The default is 1 GB, and I think with gcc-2.95, I needed a slightly larger cache.
- ccache might slow you down if you have less than 3GB of RAM.