monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [monit-dev] Toning down sleeps in wait_start/wait_stop


From: Jan-Henrik Haukeland
Subject: Re: [monit-dev] Toning down sleeps in wait_start/wait_stop
Date: Wed, 8 Jun 2011 15:26:47 +0200

On Jun 8, 2011, at 2:12 PM, Michael Renner wrote:

> Hi Monit Team,
> 
> while playing around with monit 5.1.1 and large amounts of services (~500) I 
> noticed that monit was quite slow when starting these services because it 
> would always sleep for a second after starting a service. Same goes for 
> stopping.
> 
> The code path apparently changed a bit in 5.2.5 (or the timings were a bit 
> different, causing the loop to succeed on first try) since the behavior 
> wasn't directly noticeable, but the sleep is still there. I'd suggest to tone 
> down the delay to something more useful like 5 ms (or even less), this ought 
> to be more than enough time on current hardware for a process to get set up. 
> I've attached a patch which does this.
> 
> Pulling in the complete process list to see if a service has been 
> started/stopped can also be quite wasteful, especially with large process 
> lists. Using the PID-files with sanity checks (process start time, etc.) 
> should be enough for most cases and the full process list sweep can still be 
> used as a fallthrough. But that's more of a todo item, it doesn't cause 
> problems in our environment ;).
> 
> best,
> Michael

Hi thanks for the patch. Applied the idea. You are right about the rationale 
for this and about the wastefulness of scanning the entire process tree. We are 
in the process of refactoring Monit and stuff like this will be much improved.

Thanks again


reply via email to

[Prev in Thread] Current Thread [Next in Thread]