Incorrect metric values for multi processes
Opened this issue · 1 comments
sallyruthstruik commented
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.
sallyruthstruik commented
Fix example: 787a074