www.delorie.com/gnu/docs/cfengine/cfengine-Tutorial_63.html   search  
 
Buy GNU books!


GNU cfengine

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.2 Splaying host times

The trouble with starting every cfagent at the same time using a global cron file is that it might lead to contention or inefficiency. For instance, if a hundred cfagents all suddenly wanted to copy a file from a master source simultaneously this would lead to a big load on the server. We can prevent this from happening by introducing a time delay which is unique for each host and not longer than some given interval. Cfagent uses a hashing algorithm to generate a number between zero and a maximum value in minutes which you define, like this:

 
 # Put this in update.conf, so that the updates are also splayed

 control:
 
    SplayTime = ( 10 ) # minutes

If this number is non-zero, cfagent goes to sleep after parsing its configuration file and reading the clock. Every machine will go to sleep for a different length of time, which is no longer than the time you specify in minutes. A hashing algorithm, based on the fully qualified name of the host, is used to compute a unique time for hosts. The shorter the interval, the more clustered the hosts will be. The longer the interval, the lighter the load on your servers. This `splaying' of the run times will lighten the load on servers, even if they come from domains not under your control but have a similar cron policy.

Splaying can be switched off temporarily with the `-q' or `--no-splay' options.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003