Lockless code deploys in Puppet Enterprise & Continuous Delivery for PE
Current code deploy behavior in Puppet Enterprise and Continuous Delivery for Puppet Enterprise
Your Puppet Enterprise (PE) installation’s primary job is to compile catalogs and send them to agents to be enforced. When you deploy code, all catalog compilation stops and waits for the code deploy to complete. This impacts performance in any installation, and the impact escalates with more frequent code deployments.
Code deployments usually increase when you use Continuous Delivery for Puppet Enterprise, making the impacts of stopped catalog compilations even more apparent.
Lockless code deploys eliminate the wait
We’ve introduced a new mode for deploying code in Puppet Enterprise that does not require stopping catalog compilation. This increases the number of catalogs that can be compiled per day.
Lockless code deploys work by deploying multiple versions of your Puppet code and using the most recent version when a catalog compilation request comes in. Meanwhile, existing catalog compilations continue using the version of code they started with.
Learn how to enable lockless code deploys in our docs.
What benefits can I expect?
If you’re already tracking your PE metrics, you will see the following positive changes in your metrics:
- Reduction in average JRuby wait time
- Increase in average number of free JRubies
- Elimination of number of fetch/commits with lock wait/hold
- Reduction in file sync timing from tens of seconds to almost zero seconds
- Smoothing effect on most metric graphs because there is no longer a lock followed by a burst of catalog compilations
Finally, you may see resolution to transient issues you didn’t realize were caused by code deploys.
Try lockless code deploys!
As we can see, the benefits are large and they might even clear up transient issues. You can easily enable lockless code deploys on a single compiler, watch the metrics, and then enable it on the rest of your servers. Try it out and let us know how it goes.
Nick Walker is a Senior Product Manager at Puppet.
- Read about other recent performance improvements in code manager.