On Tuesday, November 6, 2012 8:30:53 AM UTC-6, Budicom wrote:
I have a big problem with Puppet and JBoss.
In jboss/server/ directory, there are several instances. And instances
started, +100000 files are presents.
Puppetrun takes several hours to complete his cycle.
tmp/ directory is ignore in file resource (ignore => [ 'tmp', 'work',
'data', '.git', '*puppet-bak', '*class', '*tld', '*jsp' ],) but this
directory is still processed.
I don't understand.
You didn't say anything about what resources Puppet is actually managing,
and that makes a big difference. Nevertheless, it sounds like probably you
have it managing part or all of one or more JBoss instance directories, as
recursive files. That will be very costly (which is why I suppose it's
what you are doing). On each run, Puppet checks every managed file
individually to see whether it is up-to-date, and when you set up recursive
management that can be a lot of files. Cost scales both with the total
number of files and with the aggregate size of the files.
How to reduced execution time ?
Avoid recursively managing directories, especially directories containing
many files, large files, or both. Prefer to install software and even data
via your system's native package manager (yum / apt / whatever), even if it
means rolling your own packages and keeping them in a local repository
(neither of which is all that hard). Where packages are unsuitable for
some reason, approximate them by packing up your big directories into
tarballs or other archive files, managing those as individual files, and
installing from from them at need.
For borderline cases, you may be able to achieve some speedup by switching
your expensive File resources to a cheaper checksum method, or otherwise
tweaking the File parameters, but the case you describe is far beyond