On Thu, 23 Jun 2016 21:07:53 -0400 Mike Svoboda <
michael....@gmail.com> wrote:
MS> I spent quite a bit of time refactoring standard_services to work better
MS> with systemd.
MS>
https://groups.google.com/forum/#!topic/help-cfengine/2Vd7op97Tz4
MS> We actually spend 95% + of our CPU time in policy in standard_services. I
MS> haven't had time to trace down where we're spinning at, but I'm guessing
MS> its probably the regex parsing with all of the process promises.
MS> With the implementation above, we probe systemd's state once, raise
MS> namespace classes, and then use those classes for the rest of execution.
MS> Basically, we only enter the policy once and use the cached raised classes
MS> from the first pass, instead of entering the policy a million times to
MS> re-evaluate process state.
MS> Its orders of magnitude more efficient.
If you're willing to make a PR that switches to your improved version
with systemd, it would benefit everyone using the stock masterfiles,
especially if it's backwards compatible.
Ted