Sure....
For the following manifest:
service { 'haldaemon':
ensure => 'running',
enable => 'true',
hasrestart => 'true',
hasstatus => 'true'
}
The result is:
info: /Stage[main]/Service[haldaemon]: Starting to evaluate the resource
debug: Service[haldaemon](provider=redhat): Executing '/sbin/service
haldaemon status'
debug: Puppet::Type::Service::ProviderRedhat: Executing
'/sbin/chkconfig haldaemon'
info: /Stage[main]/Service[haldaemon]: Evaluated in 2.36 seconds
For the following Ruby code:
#!/usr/bin/ruby
time_start = Time.now
%x{/sbin/service haldaemon status}
%x{/sbin/chkconfig haldaemon}
time_end = Time.now
puts "Run time is: #{time_end - time_start}"
The result is:
Run time is: 0.23108
Now, I understand that there's more going on under the hood of Puppet, but
that's all it *says* that it is doing and I'm not quite sure where 2 more
seconds of time is being lost.
The most interesting thing about this is that it's not consistent. One
time, it'll be 3 seconds, then the next, a different one will take far
longer. Very odd.
Thanks,
Trevor
On Thu, May 17, 2012 at 2:23 PM, Andrew Parker <[email protected]> wrote:
> Thanks for looking into this. Could you send the traces that you are seeing
> and the command that you are executing in irb?
>
> On May 17, 2012, at 10:56 AM, Trevor Vaughan wrote:
>
>> As I've been playing with more optimization factors, I'm noticing that
>> the 'service' type appears to be quite slow.
>>
>> According to running puppet agent in evaltrace mode, very basic
>> services, that are NOT getting restarted, are taking upwards of 3
>> seconds to check.
>>
>> However, running the same commands via irb takes around 0.4 seconds.
>>
>> I've looked through the 'service' type and it seems pretty straightforward.
>>
>> This is on a CentOS platform.
>>
>> What am I missing?
>>
>> Thanks,
>>
>> Trevor
>>
>> --
>> Trevor Vaughan
>> Vice President, Onyx Point, Inc
>> (410) 541-6699
>> [email protected]
>>
>> -- This account not approved for unencrypted proprietary information --
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Developers" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-dev?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/puppet-dev?hl=en.
>
--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
[email protected]
-- This account not approved for unencrypted proprietary information --
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.