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. ElectricAccelerator users have JobCache as their own energy recovery system, too, by intelligently reusing unchanged build components.
We’re continuing our discussion of accelerating ElectricAccelerator 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 ElectricAccelerator 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”:
The report for this particular build has some interesting points. The fastest possible time to run this build without JobCache is over 17 minutes and that’s only possible if you use more than 32 agents. However, with JobCache and only 8 agents, this build runs at just under 14 minutes. The build hits its maximum performance, using JobCache, of just under 8 minutes running on 16 agents. That’s a whole lot more cost effective than 32 agents – plus it will always be faster, no matter the agent count.
“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 ElectricAccelerator you were looking for?
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.
Latest posts by Tim Johnson (see all)
- AI, DevOps, and Employment Law: Thinking Ahead - December 10, 2018
- Loving Your Pipeline’s Middle Child: 60X Test Acceleration - December 7, 2018
- More Speed with ElectricAccelerator – Part 2 - November 28, 2018