On Jul 12, 9:53 pm, Rich Rauenzahn <rraue...@gmail.com> wrote:
> We are using puppet to export nagios resources (now we're using file
> resources to represent them) and the number of resources is probably
> in the thousands -- our puppet runs take 6GB (on the client side) and
> then just sort of spin forever (it's been running for a couple of
> hours now -- and no, we're not paging.)
>
> We're using puppet 2.6.4 and ruby 1.8.6 -- upgrading is on our
> roadmap, but we need to fight a few other fires first.
>
> Anyone have any suggestions for fixing this?  Or how to mitigate this?
>  I wonder if something isn't scaling -- like maybe the number of edges
> in the puppet DAG is increasing exponentially....


I don't know whether the size of the DAG is actually your problem, but
it sounds like it might be.  On that topic, then ...

Relationships involving whole classes, especially of one whole class
on another, tend to add a lot of edges that are not strictly
necessary, because they are reduced to multiple inter-resource
dependencies.  That is, given Class['a'] -> Class['b'], you get a
relationship between each of the n resources of Class['a'] and each of
the m resources of Class['b'], for n x m DAG edges.

Run stages magnify that effect, because they establish relationships
between each class in a given stage and each class in each later
stage.  If there is a total of r resources under management, then the
number of DAG edges can scale as poorly as O(r*r).  It would be a rare
manifest set indeed where all those relationships are actually needed.

If you must use run stages (not a given!) then keeping as many classes
as possible in the main stage will tend to improve DAG scaling.  The
scaling effect for individual class relationships can be somewhat
managed by careful factoring of your classes into those intended for
other modules to depend on (these contain only a few key resources)
and those intended for use only inside the same module, coupled with
using only resource-level relationships intra-module.

For the most precise control and minimum number of DAG edges, however,
use only resource-level relationships everywhere, and audit those
relationships ruthlessly.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
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.

Reply via email to