On Tuesday, January 22, 2013 4:18:51 AM UTC-6, MorSa wrote: > > Hi, > > i've got a performance problem when running my puppet agents. I need > to apply tons of files included in my website module and i assume that > executing time would be long, but i can't understand why every time > when a File > is evaluated, it takes about 2-3 secs to do it. In my case i've got > tonf of files in this module, and time raises dramatically. If file > belongs to another module, evaluation time drops under 1 sec. > > I'm using puppet 2.7.11 under Ubuntu 12.04 LTS. My agents are running > under Solaris 10. Can anybody help me to reduce this execution time, > please? > >
To determine whether a file's content is already in sync, Puppet computes a checksum of it and of the target content, and compares. By default, it uses MD5 for the checksums, and that's probably what take most of the 2-3 seconds per file. You might be able to speed it up a bit by setting "checksum => md5lite" on your file resources. Or you could probably speed it up a lot, at the cost of a significant risk of false positive comparisons, by setting "checksum => mtime" to use last modification time for the checksum. Really, though, those are band aids. If you have a large number of related files then you probably shouldn't be managing them individually via Puppet at all. Instead, package them up and manage the package, or sync them directly with your version-control repository (under Puppet control, if you wish). John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/OjsI4DYgABwJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.