More Speed with CloudBees Accelerator - Part 2

Written by: Electric Bee
1 min read
Stay connected

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:

  1. Click the Reports toolbar button on the main ElectricInsight window.
  2. This will bring up the "Reports" window.  Select "ElectricSimulator" in the column on the left, then click "Generate this report" at the bottom:
  3.  
  4.  
  5. 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).

More Speed

For speed, ccache can't even come close to JobCache.

More Flexibility

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.

Easier Deployment

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.