The splay
and splaylimit
settings work together with the runinterval
setting to help spread out agents' catalog requests in time. They are useful primarily in situations where many machines' agents may be started at once, such as when a bunch of VMs all start up together under control of the same host.
Ordinarily, the agent, when running in daemon mode, starts a catalog run when it first starts up, and again at runinterval
intervals. If the splay
option is set true
then it instead generates a (pseudo-)random delay, not exceeding splaylimit
, and delays the start of each catalog run by that amount of time, relative to when it would have started if splaying were disabled.
Thus, if you have a thundering herd problem arising from many agents being started at about the same time, then you could try to address it by setting
splay = true
in your agents' configurations. If you don't configure a specific splaylimit
then it defaults to your runinterval
, resulting in the catalog runs of all the agents started at the same time being spread more or less uniformly over the whole interval, and therefore over all time going forward.
On the other hand, if your agents' startup is not somehow orchestrated so as to cause them to bunch up, then splaying doesn't really do anything for you. That is, if agent startups are approximately random anyway then it doesn't help you to shift their catalog request cycles.
I think splay can also help when you run the agent in --onetime
mode via an external scheduler (e.g. cron
). That would present a good use case for the splaylimit
setting, because in that case the configured runinterval
has nothing to do with when or how frequently the agent runs.