Forum: CFEngine Help
Subject: managing cf-execd children
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,22992,22992#msg-22992

So, I've recently had two incidents which led to a whole bunch of cf-agent 
and/or cf-promises processes causing CPU starvation.  Ignoring the root cause 
(bugs in cf-agent and cf-promises), I would like a way for cf-execd to directly 
control the number of children it spawns.  Not only would I prefer to avoid 
taking more heat for these problems :), but as I'd rather not see more than 2-3 
cf-agents launched from cf-execd at any given time.  Ultimately, this is a 
system to maintain the computer, not the thing that actually makes money, so I 
want to limit its potential impact.

As such, I was looking for something like maxchildren and maybe even a 
nice_level option for children fired from cf-execd.  It'd be even better if I 
could define those two parameters based on a class (such as time of day) so 
that I could, say, restrict children with a persistent class set by cf-agent 
when it notices that an important job is running - or open up execution based 
on time of day.  But in any event, I'm curious how other people are doing this. 
 If no one's solved (or cared about) this problem prior to now, I guess I'll go 
create a new feature request.

Note, doing this within cf-agent does not meet my goal, as both of the cases 
where it's been a real problem have been cases where cf-agent execution has not 
worked as expected.  I actually have some controls in cf-agent to kill other 
long-running agents, but those don't work well when the database wedges or 
cf-promises goes to an infinite loop in the initial syntax check. :)

_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to