supermann
supermann copied to clipboard
Incorrect metric values for multi processes
Looks like metric you send doesn't consider suprocesses. For example, I run gunicorn with 8 workers:
gunicorn wsgi:app -w 8
and write in stderr your rss:absolute metric and sum of children values:
logging.error("{}-{}".format(
memory_info.rss,
sum(p.memory_info().rss for p in process.children())
))
And I got
20766720-1070051328
So master process take ~20Mb but with children processes it takes about 1Gb of memory.
I think better solution is to allow metrics to take an account of their child processes. But in this way it is unclear how to calculate percentage values.
Fix example: https://github.com/borntyping/supermann/pull/14/commits/787a07474fcdee82f38392982da3f36ba06f3f14