Hi, And further to that I also did a quick skim and found you use augeas for a few resources that can probably be better executed with simpler resource types (I'm looking at you yumrepo). Augeas is costly from my understanding.
Also to get a good view of where the costs are in your manifest you can use the practically undocumented '--evaltrace'. It will show how long it takes to apply a resource on the host. Cheers Den > On 8 Apr 2014, at 7:39, Pete Brown <[email protected]> wrote: > > Hi Harrison, > > Here are some initial thoughts after a quick glance at your code. > > First question I would have would be why are you using ensure_resource > to do one thing at a time? > Like install one package or one service etc. > I love wrappers but it seems like overkill to use it do do something > the native resource will do itself. > The native resource is likely much faster. > > If you were using ensure_resource to say create 1000 users then sure go for > it. > Yeah it make things if they don't exist but to me it's sloppy coding > and a waste of resources (pun intended). > > Second question is why do you have a define inside a class? > It will probably have no effect on the speed but it's not good > practice and makes the code harder to read. > > Hope that helps. > > Pete. > > >> On 8 April 2014 06:03, Harrison Ripps <[email protected]> wrote: >> Hey all-- >> Over at OpenShift we are big fans of Puppet. We've developed our own module, >> which is central to our OpenShift Origin installer and to our Vagrant-based >> development environment. As the author of the installer and the current >> project lead for OpenShift Origin, I really want to promote these tools >> across our entire team, ops and developers. >> >> The challenge that I am facing is that right now, our Puppet module seems >> pretty slow. I am not a Puppet expert, but I'm willing to bet that someone >> with decent Puppet skills would look at our module and chuckle inwardly >> about the obvious performance potholes that we're driving through. >> Hopefully, after that, you'd be willing to follow up on this thread and let >> me know what we can do to get the lead out. >> >> So, if you have a few cycles, please have a look at >> https://github.com/openshift/puppet-openshift_origin and let me know how you >> think we can make it better and faster. >> >> Thanks! >> Harrison >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/puppet-users/40bd9c96-b63e-4752-a487-661591a35d02%40googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/CAJ8DPF7UJZKM6RGxnx-PFcVg9eNnQ%3DJxXeNaFM%2BO4jRH5JOKxQ%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52942FF9-EB00-432A-B860-08D02C279D97%40gmail.com. For more options, visit https://groups.google.com/d/optout.
