matching by name rather than PID is noticeably higher cpu usage
I'm using monit 5.10, but I haven't seen anything in the change log to indicate anything in this area has changed. I'm using monit with OpenWrt, which recently switched init systems, and no longer has ready access to pid files for processes anymore. After switching my process check files to use regexp matching instead of pid file matching, the cpu usage of monit is noticeably higher[1], every 60 seconds (the scan interval) Some preliminary investigation with monit -vI and "perf" shows that it seems to be occupied with scanf/printf, presumably in the code scanning the /proc tree.
I'm not entirely sure if there's anything that can actually be done about this, but I'd be interested in hearing if there are any workarounds or tweaks I can use to improve this in my matching rules, or in monit itself.
[1] higher from "I don't notice monit as using cpu" to "monit is using 15-25% cpu, often"
Comments (6)
-
repo owner -
repo owner - marked as enhancement
-
assigned issue to
-
repo owner - changed status to on hold
on hold till the new process engine is implemented
-
repo owner - changed status to open
-
repo owner - changed status to resolved
Fix Issue
#60: The process match check may report false positive ... if we find matching process and it is not running, scan the rest of process tree.Fix Issue
#214: The process match check has high CPU requirements on low power systems ... use cached PID.→ <<cset e5bbe778c8be>>
-
repo owner - removed version
Removing version: 5.10 (automated comment)
- Log in to comment
Hello,
we work on process engine refactoring and will it make more effective (less memory in general, less cpu for pattern based match).