Issue #13575 has been updated by Stefan Schulte.

to check a simple file resource is easy because puppet can use pure ruby code 
(and simple stat system calls). If you run puppet agent with the `--debug` flag 
you'll see when puppet is executing an external command which may give more 
insight view. On RedHat puppet will run a `/sbin/chkconfig servicename` and, 
depending whether `hasstatus` is true or false, will execute `/sbin/service 
servicename status` (if hasstatus is set to true) or `ps -ef` and parse the 
output (if hasstatus is set to false).

I guess that's what taking the most time and I have no idea how to improve 
speed around here.
----------------------------------------
Feature #13575: class Service too slow
https://projects.puppetlabs.com/issues/13575#change-60093

Author: Pablo Fernandez
Status: Needs More Information
Priority: Normal
Assignee: Pablo Fernandez
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


Hi,

I have just added to my testing environment 20 Services that I want to make 
sure they are not started, and suddenly the time puppet agent takes to run has 
multiplied. It went from 2.3 seconds to 6.8 (just the "service" section). The 
rest of the time spent on the other classes is negligible, compared to the 
Service class, if you take away the "config retrieval". 

So, I took away the module that ensures all those services are stopped (it just 
does a enable => false) and the time goes back to normal:

-    last_run: 1333379655                                                       
                                                   
-    service: 6.847941                                                          
                                                   
-    total: 9.38650103457641                                                    
                                                   
-    config_retrieval: 2.11831903457642                                         
                                                   
-    package: 0.020925                                                          
                                                   
-    filebucket: 0.000494                                                       
                                                   
-    notify: 0.004085                                                           
                                                   
-    file: 0.392612                                                             
                                                   
-    exec: 0.002125                                                             
                                                   
+    last_run: 1333379753                                                       
                                                   
+    service: 2.364656                                                          
                                                   
+    total: 4.94454407040405                                                    
                                                   
+    config_retrieval: 2.16072607040405                                         
                                                   
+    package: 0.201954                                                          
                                                   
+    filebucket: 0.000344                                                       
                                                   
+    notify: 0.003545                                                           
                                                   
+    file: 0.212003                                                             
                                                   
+    exec: 0.001316                                                             
                                                   

I really think something should be done to improve the performance of the 
Service class.

Thanks!
Pablo


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to