I'm using puppet3.7.1 and facter2.2.0. 
Now I find out that the time was spent on finding facts.

class Puppet::Node::Facts::Facter < Puppet::Indirector::Code

  # Lookup a host's facts up in Facter.
  def find(request)
    Facter.reset
    self.class.setup_external_search_paths(request) if Puppet.features.
external_facts?
    self.class.setup_search_paths(request)

    Puppet.notice "before Puppet::Node::Facts.new( 
#{Facter.to_hash})---------"
    result = Puppet::Node::Facts.new(request.key, Facter.to_hash)

The function “Facter.to_hash” takes about 75 seconds every time if I use 
"mco puppet runonce -v -F computer_ip='172.16.233.110' " on a remote 
mcollective master, but works fine if I use "puppet agent -t -v" on the 
target computer.
Do you have any ideas why facter behaves like this?


On Friday, June 12, 2015 at 7:59:51 AM UTC+8, Henrik Lindberg wrote:
>
> On 2015-11-06 3:40, [email protected] <javascript:> wrote: 
> > I met the same problem with you now. Did you figure it out as last?  Can 
> > you give me some suggestion? 
> > 
> > 在 2013年2月27日星期三 UTC+8上午2:32:33,r.yeo写道: 
> > 
> >     Running the agent in debug mode on a some clients and I am seeing 
> >     long run times such as this, but only after the "using pson" lines : 
> > 
> >     Tue Feb 26 10:57:38 2013: Debug: file_metadata supports formats: 
> >     b64_zlib_yaml pson raw yaml; using pson 
> >     Tue Feb 26 10:58:53 2013: Info: 
> >     /Stage[main]/Vpn::Config/File[/opt/cisco/vpn/.anyconnect_global]: 
> >     Evaluated in 75.03 seconds 
> > 
> >     Tue Feb 26 10:58:53 2013: Debug: file_metadata supports formats: 
> >     b64_zlib_yaml pson raw yaml; using pson 
> >     Tue Feb 26 11:00:08 2013: Info: 
> >     
> /Stage[main]/Amadeuspro/File[/etc/puppet/tmp/com.HairerSoft.AmadeusPro.plist]:
>  
>
> >     Evaluated in 74.78 seconds 
> >     Tue Feb 26 11:00:08 2013: Info: 
> >     /Stage[main]/Adobe/File[/etc/puppet/tmp/com.adobe.Reader.plist]: 
> >     Starting to evaluate the resource 
> >     Tue Feb 26 11:00:08 2013: Debug: file_metadata supports formats: 
> >     b64_zlib_yaml pson raw yaml; using pson 
> >     Tue Feb 26 11:01:23 2013: Info: 
> >     /Stage[main]/Adobe/File[/etc/puppet/tmp/com.adobe.Reader.plist]: 
> >     Evaluated in 75.00 seconds 
> > 
> >     Tue Feb 26 11:01:23 2013: Debug: file_metadata supports formats: 
> >     b64_zlib_yaml pson raw yaml; using pson 
> >     Tue Feb 26 11:02:38 2013: Info: 
> >     /Stage[main]/Puppet::Snow/File[/etc/hooks/cleanpup.pl 
> >     <http://cleanpup.pl>]: Evaluated in 75.01 seconds 
> > 
> >     This catalog took 921.02 to complete : 
> > 
> >     Tue Feb 26 11:02:38 2013: Notice: Finished catalog run in 916.78 
> seconds 
> >     Tue Feb 26 11:02:38 2013: Changes: 
> >     Tue Feb 26 11:02:38 2013: Events: 
> >     Tue Feb 26 11:02:38 2013: Resources: 
> >     Tue Feb 26 11:02:38 2013:             Total: 55 
> >     Tue Feb 26 11:02:38 2013:           Skipped: 6 
> >     Tue Feb 26 11:02:38 2013: Time: 
> >     Tue Feb 26 11:02:38 2013:        Filebucket: 0.00 
> >     Tue Feb 26 11:02:38 2013:           Package: 0.00 
> >     Tue Feb 26 11:02:38 2013:    Ssh authorized key: 0.00 
> >     Tue Feb 26 11:02:38 2013:              User: 0.06 
> >     Tue Feb 26 11:02:38 2013:             Group: 0.11 
> >     Tue Feb 26 11:02:38 2013:              Exec: 0.59 
> >     Tue Feb 26 11:02:38 2013:    Config retrieval: 13.28 
> >     Tue Feb 26 11:02:38 2013:          Last run: 1361901758 
> >     Tue Feb 26 11:02:38 2013:              File: 906.98 
> >     Tue Feb 26 11:02:38 2013:             Total: 921.02 
> >     Tue Feb 26 11:02:38 2013: Version: 
> >     Tue Feb 26 11:02:38 2013:            Config: 1361893868 
> >     Tue Feb 26 11:02:38 2013:            Puppet: 3.1..0 
> > 
> >     Also, this isn't global as I have nodes getting identical complete 
> >     configs in 7 seconds and run times are just fine after the using 
> >     pson lines. 
> > 
> >     Example of a fast node : 
> > 
> >     Tue Feb 26 11:22:57 2013: Debug: file_metadata supports formats: 
> >     b64_zlib_yaml pson raw yaml; using pson 
> >     Tue Feb 26 11:22:58 2013: Info: 
> >     
> /Stage[main]/Amadeuspro/File[/etc/puppet/tmp/com.HairerSoft.AmadeusPro.plist]:
>  
>
> >     Evaluated in 0.15 seconds 
> >     Tue Feb 26 11:22:58 2013: Info: 
> >     /Stage[main]/Adobe/File[/etc/puppet/tmp/com.adobe.Reader.plist]: 
> >     Starting to evaluate the resource 
> >     Tue Feb 26 11:22:58 2013: Debug: file_metadata supports formats: 
> >     b64_zlib_yaml pson raw yaml; using pson 
> >     Tue Feb 26 11:22:58 2013: Info: 
> >     /Stage[main]/Adobe/File[/etc/puppet/tmp/com.adobe.Reader.plist]: 
> >     Evaluated in 0.07 seconds 
> > 
> >     Puppet master and clients are 3.1 with Dashboard 1.2.22 and also 
> >     using PuppetDB. 
> > 
> >     Any thoughts why I'd have trouble and long run times on select nodes 
> >     when pson is called? 
> > 
>
> A number of performance enhancements have gone into puppet after version 
> 3.1 - if your case is helped by one of them I am not sure, but we have 
> worked on scenarios like "many modules", "many resources". 
> If you want to find out in more detail, you have to search for closed 
> tickets in our Jira for the various enhancements - or look at release 
> notes - this to see if anything looks like it resembles your case. 
>
> OTOH - Puppet is now at 3.8.1 on the 3.x branch and 4.1 is released on 
> 4.x, so you may want to consider updating to latest 3.x and see if there 
> is a difference in time. 
>
> - henrik 
>
> -- 
>
> Visit my Blog "Puppet on the Edge" 
> http://puppet-on-the-edge.blogspot.se/ 
>
>

-- 
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/a66f963a-e1f0-4602-af97-67a46f163c2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to