Here's how I do it, which IMHO works really well in most situations and is
much simpler.  No external scripts, no custom functions.  We take the IP
address of the system, strip out the periods, and modulo 30 it:

  $cron_time1= generate('/usr/bin/env', 'sh', '-c', "printf $(($(echo
$::ipaddress | awk -F . \'{print \$1+\$2+\$3+\$4}\') % 30))")
  $cron_time2 = $cron_time1 + 30

Now, that's if you want to have your systems check in twice per hour.  You
can adjust it accordingly if you want quicker or longer check-in intervals.

Jeffrey.

On Tue, Dec 20, 2011 at 7:46 AM, Trevor Vaughan <tvaug...@onyxpoint.com>wrote:

> One other thing to look at is how many nodes are hitting your server at
> once.
>
> If you're not using the ip_to_cron function from the Cron Patterns
> page, you might want to take a look at it.
>
> http://projects.puppetlabs.com/projects/1/wiki/Cron_Patterns
>
> Some people are also using MCollective to to a more controlled call-in of
> nodes.
>
> Trevor
>
> On Fri, Dec 16, 2011 at 7:56 AM, Antonio Xanxess
> <antonio.sanchez.agui...@gmail.com> wrote:
> > Hi everyone,
> >
> > I have a problem with my Puppet server, the server is overloaded and
> > processes need to add half of my farm nodes yet!
> > The server is hosted on a blade with the following characteristics:
> > Processors: 8 cores
> > Memory Ram: 12 Gb
> > Operating System: Debian Squeeze
> > Version of parcel:
> > 2.7.1-1 ~ bpo60 puppet 1
> > puppet-common 2.7.1-1 ~ bpo60 1
> > 2.7.1-1 ~ bpo60 1 puppetmaster
> > puppetmaster 2.7.1-1 ~ bpo60-1 common
> > puppet vim 2.7.1-1 ~ bpo60-1
> >
> > The number of nodes that I have now is 1927 and I'm in the middle of
> > the deployment process. The nodes do not use the demon puppet, but I
> > created a cron task that runs dispersed to run in one hour intervals.
> > With these data the server is currently using on average 4 cores, but
> > the RAM is used almost entirely (it has 1 GB free of 12)
> > I would like to know some technical expert for the optimization of
> > services, anything you can think of will help me because I am a bit
> > blocked ....
> > I've been thinking about creating another puppetmaster and use a load
> > balancer, but in my case would have security problems because the
> > connections are behind the balancer and servers unencrypted would be
> > in different physical locations, having to go unencrypted information
> > by the network.
> >
> > Thank you and if you need some data from the server will put.
> >
> > A greeting!
> >
> > --
> > 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.
> >
>
>
>
> --
> Trevor Vaughan
> Vice President, Onyx Point, Inc
> (410) 541-6699
> tvaug...@onyxpoint.com
>
> -- This account not approved for unencrypted proprietary information --
>
> --
> 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.
>
>

-- 
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