This got me to thinking. The GNU make program has the "-j"
option, which allows make to start more than one action
in parallel if the actions are at the same dependency level.
I've used this option on a 48-core machine to great benefit.
So, why can't there be a similar option in the puppet agent?
I can easily imagine how this could substantially reduce the
length of time for a puppet run.
(The make "-j" option allows an optional numeric value, which, if
given, is the maximum number of actions that can be run
in parallel. If no numeric is given, then there's no limit
to the number of parallel actions).
I did a quick review of the Puppet manual but I didn't see
anything like this. Am I missing something? Is this a good
idea?
Cordially,
Jon Forrest
http://docs.puppetlabs.com/references/stable/configuration.html#graph
you can identify those sub-graphs that could run in parallel pretty
easily, just by eyeballing it. Parallel execution is wonderful for an
optimizing compiler because you're strongly CPU limited. I'd be
willing to bet that a parallel puppet agent would be of less use: once
the catalog is compiled on the master, puppet's execution time is
going to be limited by network and disk IO. Probably. Running puppet
agent through DTrace/SystemTap would be instructive.
Also, some resources are implicitly exclusive: two Packages with 'apt'
providers cannot be run in parallel because Debian/Ubuntu keeps a
global lock on... hmm, I've forgotten what, exactly. It's there,
though. Ensuring that implicitly parallel resources block one another
would increase the implementation complexity of Puppet, of end-user
modules or, as is likely, both.
Aside from all other considerations, multi-core parallelism in MRI is
not so great. JRuby's better, being hosted on the JVM, but, well,
MRI's RAM consumption is already bad enough.
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
--
Brian L. Troutwine
(First of all, sorry for the jumbled first paragraph. I was
trying to do two things at once).
> An interesting thought. If you enable graph output in your puppet.conf
>
> http://docs.puppetlabs.com/references/stable/configuration.html#graph
>
> you can identify those sub-graphs that could run in parallel pretty
> easily, just by eyeballing it. Parallel execution is wonderful for an
> optimizing compiler because you're strongly CPU limited. I'd be
> willing to bet that a parallel puppet agent would be of less use: once
> the catalog is compiled on the master, puppet's execution time is
> going to be limited by network and disk IO. Probably. Running puppet
> agent through DTrace/SystemTap would be instructive.
My intuition, albeit as a novice, makes me question this.
Just look at how well parallel make improves things.
There would probably be a point of diminishing returns,
or even negative returns, but that's true for "make -j" also.
Just "puppet -j2" could result in enough of a benefit to
make this approach worthwhile.
> Also, some resources are implicitly exclusive: two Packages with 'apt'
> providers cannot be run in parallel because Debian/Ubuntu keeps a
> global lock on... hmm, I've forgotten what, exactly. It's there,
> though. Ensuring that implicitly parallel resources block one another
> would increase the implementation complexity of Puppet, of end-user
> modules or, as is likely, both.
I see what you mean. The same is true for yum, which is what
I'm most familiar with. Maybe puppet could do something so
that these kind of inherent sequential processes with yum/apt (and
anything else) could be reflected in the graph.
> Aside from all other considerations, multi-core parallelism in MRI is
> not so great. JRuby's better, being hosted on the JVM, but, well,
> MRI's RAM consumption is already bad enough.
I'm talking about process-level parallelism so I don't think
the virtual machine implementation matters here.
Jon
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/b836c960-09bc-48f5-8b5f-407d42233b10%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
This is a fantastic idea! Any progress on this?
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/86d46ce2-a714-48c1-9954-b5c9b483b14a%40googlegroups.com.
[...] this may not happen but it would still be nice to have.
Wow, that's quite some dead thread resurrection!I remember this being discussed in the past and part of the issue is that so many parts of what Puppet is doing are I/O bound so I'm not really sure what the parallelism would gain you outside of destroying your I/O channels.That said, I think it would be nice to have supported for those that do have systems that can take advantage of it. We may even see that a -j2 would give just enough balance between I/O destruction and system acceleration.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CANs%2BFoV5iSNbuS%2BnxEzmU7mhQXzGtwf5p4-e4M3P1K_b_P_Fbw%40mail.gmail.com.