More Speed, Part 2: Less Building, More Caching
Formula One and Sports Prototype racers have KERS (kinetic energy recovery systems) for capturing a race car's kinetic energy under braking to apply a burst of power at the push of button. They don't have expend additional fuel to go faster - it reuses energy that's already been spent. CloudBees Accelerator users have JobCache as their own energy recovery system, too, by intelligently reusing unchanged build components. We’re continuing our discussion of accelerating CloudBees Accelerator in this blog with a description of how to recognize when you need JobCache to turbocharge your builds. We talked in depth about JobCache in December 2016 so you can find a complete description of how it works there. The Sea Level report, discussed here , helps determine whether or not you need additional agents to make your builds faster. But as we showed, sometimes adding more agents isn’t necessary or even possible. If more agents aren't the answer but you need to go faster, JobCache can probably help. JobCache increases build times by intelligently rebuilding only the components that have changed since the last build. This speeds builds using the resources you already have - up to five times faster - or lets you maintain performance on significantly less hardware. You get the double benefit of faster builds and better resource utilization.
"But I thought more agents always meant faster builds"
Not necessarily. Parallelizing builds across more cores gives the most immediate speed gains but there is an eventual point of diminishing returns. Adding more agents also doesn't take in the bigger picture of the build itself. If portions of the code haven't changed, then you are wasting time rebuilding them. If a developer is working on a particular problem and only making small changes to the entire code base, the time doing full builds - even at CloudBees Accelerator speeds - can add up. That's where JobCache comes in to help. It analyzes your builds and automatically detects unchanged artifacts from your last build and intelligently reuses them.
"How can I tell if JobCache will help?"
Fortunately, we've built in a report that will give you a clear idea of how JobCache can make a difference to your build times. It's called the ElectricSimulator report and reads an existing annotation file to show you how much time you will save with JobCache and it shows you performance comparisons over a range of agent counts. And it's dead easy to run. Here's how:
The ElectricSimulator Report
To run the ElectricSimulator report:
- Click the Reports toolbar button on the main ElectricInsight window.
- This will bring up the "Reports" window. Select "ElectricSimulator" in the column on the left, then click "Generate this report" at the bottom:
- To see side-by-side simulations with and without jobcache enabled, enable the "Second series" simulation, then choose your jobcache options (such as GCC or Jack jobcache), then click "Run":
"We tried ccache and had a lot of issues with it. How is JobCache any different?"
We're glad you asked. JobCache is faster, more versatile, faster, easier to use and deploy, and faster than ccache or winkins (for those of us old enough to remember winkins).
For speed, ccache can't even come close to JobCache.
For versatility, JobCache caches more than just object files, it also caches dependency files and even works with Microsoft CL. ccache has issues detecting when new header files are created, JobCache doesn't. ccache also has issues with multiple builds sharing the same cache, JobCache doesn't.
For ease of use, adding JobCache is a matter of adding a single command line option. Because JobCache is constantly monitoring everything in the build, it's a lot faster at detecting cache misses and problems.
Will JobCache help you get that turbo boost from CloudBees Accelerator you were looking for?
Probably. To find out for sure, register here for a demo and your Customer Success Manager will be in touch to help you figure that out.
Stay up to date
We'll never share your email address and you can opt out at any time, we promise.