Hello,

Just an update on this:

* The flush & post_resource_eval code has been committed in HEAD. It's 
still unreleased, but you can easily use it in the git repo. It improves 
perfs for Puppet 3.4+;
* Improvements have been made to error reporting;
* The first step splitting the lib (making a base type and provider) is 
currently at the PR stage 
at https://github.com/hercules-team/augeasproviders/pull/91


Again, ideas & feedback are welcome.


Raphaël


On Friday, February 28, 2014 4:28:03 PM UTC+1, Trevor Vaughan wrote:
>
> Thanks for all of your work on this, I'll test it out as soon as I am able!
>
> Trevor
>
>
> On Thu, Feb 27, 2014 at 6:15 AM, Raphaël Pinson <[email protected]<javascript:>
> > wrote:
>
>> Hello,
>>
>>
>> I kept working on this. The current branch (and associated PR at 
>> https://github.com/hercules-team/augeasproviders/pull/80) shares one 
>> Augeas handler per provider. This was made possible by Puppet 3.4's 
>> post_resource_eval class method, which lets me close the handler once all 
>> resources are applied. This branch is almost ready to be merged, and I 
>> don't see how I could still reduce the amount of file openings (Augeas 
>> needs to read the file before each write to merge the tree, and saving 
>> needs to be done per resource in flush, otherwise it will affect other 
>> resources and dependencies).
>>
>>
>> Cheers,
>>
>> Raphaël
>>
>>
>> On Monday, February 10, 2014 4:22:58 PM UTC+1, Raphaël Pinson wrote:
>>>
>>>
>>> On Monday, February 10, 2014 4:14:59 PM UTC+1, Trevor Vaughan wrote:
>>>>
>>>>
>>>>
>>>>> I started working on the flush part. I have a dev branch (which 
>>>>> doesn't pass all tests just now) at https://github.com/raphink/
>>>>> augeasproviders/tree/dev/aug_one_handler
>>>>>
>>>>> Feel free to test it and let me know if that improves your situation 
>>>>> with the number of files opened by Augeasproviders.
>>>>>
>>>>
>>>> Awesome, I'll have to check it out!
>>>>
>>>
>>>
>>> For the record, here are my tests using the unit tests on the providers:
>>>
>>> # master branch (current HEAD):
>>> $ strace -e trace=open /home/rpinson/.rvm/rubies/ruby-1.9.2-p320/bin/ruby 
>>> -S rspec spec/unit/augeasproviders/provider_spec.rb 
>>> spec/unit/puppet/apache_setenv_spec.rb spec/unit/puppet/host_spec.rb 
>>> spec/unit/puppet/kernel_parameter_grub2_spec.rb 
>>> spec/unit/puppet/kernel_parameter_grub_spec.rb 
>>> spec/unit/puppet/mailalias_spec.rb spec/unit/puppet/mounttab_fstab_spec.rb 
>>> spec/unit/puppet/mounttab_vfstab_spec.rb 
>>> spec/unit/puppet/nrpe_command_spec.rb 
>>> spec/unit/puppet/pg_hba_spec.rb spec/unit/puppet/puppet_auth_spec.rb 
>>> spec/unit/puppet/rsyslog_spec.rb spec/unit/puppet/shellvar_spec.rb 
>>> spec/unit/puppet/shellvar_type_spec.rb spec/unit/puppet/sshd_config_spec.rb 
>>> spec/unit/puppet/sshd_config_subsystem_spec.rb 
>>> spec/unit/puppet/sysctl_spec.rb spec/unit/puppet/syslog_spec.rb 2>&1 | 
>>> grep -c /tmp/target
>>> 2571
>>>
>>> # dev/aug_one_handler branch:
>>> $ strace -e trace=open /home/rpinson/.rvm/rubies/ruby-1.9.2-p320/bin/ruby 
>>> -S rspec spec/unit/augeasproviders/provider_spec.rb 
>>> spec/unit/puppet/apache_setenv_spec.rb spec/unit/puppet/host_spec.rb 
>>> spec/unit/puppet/kernel_parameter_grub2_spec.rb 
>>> spec/unit/puppet/kernel_parameter_grub_spec.rb 
>>> spec/unit/puppet/mailalias_spec.rb spec/unit/puppet/mounttab_fstab_spec.rb 
>>> spec/unit/puppet/mounttab_vfstab_spec.rb 
>>> spec/unit/puppet/nrpe_command_spec.rb 
>>> spec/unit/puppet/pg_hba_spec.rb spec/unit/puppet/puppet_auth_spec.rb 
>>> spec/unit/puppet/rsyslog_spec.rb spec/unit/puppet/shellvar_spec.rb 
>>> spec/unit/puppet/shellvar_type_spec.rb spec/unit/puppet/sshd_config_spec.rb 
>>> spec/unit/puppet/sshd_config_subsystem_spec.rb 
>>> spec/unit/puppet/sysctl_spec.rb spec/unit/puppet/syslog_spec.rb 2>&1 | 
>>> grep -c /tmp/target
>>> 1352
>>>
>>>
>>> It's not amazing, but it already divides the number of open files by two.
>>>
>>>
>>> Cheers,
>>>
>>> Raphaël
>>>
>>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-dev/369f40d8-ba4d-4998-a61d-2055505081f0%40googlegroups.com
>> .
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Trevor Vaughan
> Vice President, Onyx Point, Inc
> (410) 541-6699
> [email protected] <javascript:>
>
> -- This account not approved for unencrypted proprietary information -- 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" 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-dev/0dabe828-e55a-493d-95d6-59b8602e690a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to