Max concurrent checks - spreading the next_time

Hiren Patel hir3npatel at gmail.com
Thu Jun 11 09:55:55 CEST 2009


Ton Voon wrote:

> 
>> I can't help but think that something like this could have been quite
>> easily resolved with a round-robin scheduling queue, where items  
>> requested
>> to be queued would simply get inserted within 5 seconds of the  
>> requested
>> time where there are the most free slots. The prng idea will probably
>> work just as well though, and I'm fairly certain you could just use
>>
>>  next_time = service->check_interval - 7 + (*service->description &  
>> 0xf);
>>
>> to get a distribution almost equally good without having to bother
>> about the PRNG-business. This would yield 7 seconds +-, which is
>> probably good enough.
> 
> I notice that rand() is already used elsewhere in nagios, so I will go  
> with that instead.
> 
I haven't seen this being an issue with our setup, but if there's a way 
to simulate it and you'd like me to test this for you, I'd be glad to.

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects




More information about the Developers mailing list