On 12/24/2012 01:59 AM, Jakov Sosic wrote:

Thank both you and Nan Liu.

As the holidays approached I finally got a free day to work on this :)
I've rewritten 3 out of 4 my custom providers to self.instances schema.

I will test this and report back performance improvements on puppet
agents run with lots of resources of custom type I wrote, after I
rewrite the final provider.

And code looks much cleaner too! :) Once more a big thank you both :)

OK, I've finally published Cobbler module for Puppet :)

http://forge.puppetlabs.com/jsosic

https://bitbucket.org/jsosic/puppet-cobbler



And here is the most complex provider I have so far:

https://bitbucket.org/jsosic/puppet-cobbler/src/da3cdd684314360dcc5c633f374310f59f87ec42/lib/puppet/provider/cobblersystem/system.rb?at=default



And now about performance increase after rewriting my providers to use XMLRPC one-call-per provider (self.instances) instead of few cmdline calls for every resources. These are the agent run times:


Site1 (22 x cobblersystem)
- before: 68.1s
- after:   9.7s

Site2 (19 x cobblersystem)
- before: 54.0s
- after:  10.0s

Site3: (11 x cobblersystem)
- before: 40.9s
- after:   9.7s

Site4: (22 x cobblersystem)
- before: 80.1s
- after:  10.6s

So I guess this changes move it from O(n) to O(1) :)



--
Jakov Sosic
www.srce.unizg.hr

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to