This message was deleted.
# puppet
s
This message was deleted.
u
A brk() is apparently used to change the size of the heap. Can I do something to start with a bigger heap?
b
any chance you have a few file resources with purge => true and/or recurse => true?
u
Few? Many? I don't think so. Files are mostly created.
b
was it ever fast? did you change anything recently?
u
It was never fast.
b
can you run puppet apply with --debug --evaltrace
u
Sure
Should I send the output somewhere? What am I looking for?
(currently running)
b
open a second terminal and look for memory usage. maybe at some point the debug output stops. the last few lines might be interesting. in parallel check if the allocated memory of the apply process starts to increase when debug output stops
u
I see a lot of
Copy code
Adding autorequire relationship with File
then
Copy code
Skipping automatic relationship with File
(apache module) - it's creating vhosts .conf files
I can see that the Puppet agent ram use went up after the run, yes. From 7xx MB to 9xx
b
"after"? did it finish? or is it still running and just the output stopped?
u
Yes, it finished
b
ah okay
u
Copy code
Notice: Applied catalog in 336.01 seconds
b
you can add --summarize to get information about theamount of time spend per resource type
u
Ok, will be bak in 330 seconds 🙂
b
also add --write-catalog-summary
that will write the report to /opt/puppetlabs/puppet/cache/state/
u
Ok, done
waiting for it to finish
b
that will create a huge yaml file with all resources and the time spend on each resource
u
Copy code
Notice: Applied catalog in 303.32 seconds
Application:
   Initial environment: cleanupdevusers
   Converged environment: cleanupdevusers
         Run mode: user
Changes:
Events:
Resources:
            Total: 8538
Time:
       Filebucket: 0.00
        Mailalias: 0.00
          Yumrepo: 0.00
     Selinux port: 0.00
         Schedule: 0.00
           Anchor: 0.00
        File line: 0.00
        Selmodule: 0.00
   Ssh authorized key: 0.00
            Group: 0.00
   Selinux fcontext: 0.01
       Selboolean: 0.05
      Ini setting: 0.05
             User: 0.07
             Exec: 0.09
      Concat file: 0.11
          Vcsrepo: 0.33
   Concat fragment: 0.42
     Alternatives: 0.45
           Augeas: 0.54
          Service: 1.45
         Last run: 1686347840
   Firewalld service: 3.60
   Transaction evaluation: 300.94
   Catalog application: 303.32
          Package: 5.83
   Config retrieval: 56.98
             File: 8.31
            Total: 304.25
Version:
           Puppet: 7.24.0
           Config: atqrh8phpd1-cleanupdevusers-1bd705738ae
b
lol, 8k resources
5 minutes is a good time for that
u
Ok
b
you are doing a lot on that box
is there maybe some legacy code that can be removed?
u
Not really, just creating virtual hosts for the dev environments. One per dev, per app.
How can I tell which modules, classes or resources are the most time consuming?
I don't see how much time it has spent on it, but there are timestamps
b
transaction evaluation took 300s
thats before the catalog is applied
u
Ok
So the total runtime is probably 600+s?
b
mhm I am not sure
and I dont find proper docs for those metrics
I need to head out for today. you can take a look at the yaml files in the state dir, maybe they provide some more insights
@josh from the --summary output, is there a documentation for the different timings, for example transaction evaluation? I only found https://tickets.puppetlabs.com/plugins/servlet/mobile#issue/PUP-10531
u
No worries, thanks a lot and have a great week-end!
Adding
time
in front of my
puppet
command shows more than 7 minutes.
y
It looks like you’re copying a lot of files (vhost contents maybe?).. if so I’d suggest to deploy the contents with git or a tarball maybe.. that will reduce amount of resources in puppet
u
That would defeat the purpose of auto-generated vhost conf files.
b
there might be some room for improvement, but that time isnt bad for 8k resources. so unless it has to be faster, I would leave it as is
y
So what’s managed is just vhost configs, right? No www root dirs?
I mean that no www contents is managed with puppet
u
Only the configuration
The contents is pushed by devs or CI/CD
👍🏻 1
It's ok, you can stop putting efforts on this. I jus wanted to know it it was "normal". Thanks a lot everyone