sygnal icon indicating copy to clipboard operation
sygnal copied to clipboard

monitor CPU spent in GC

Open richvdh opened this issue 3 years ago • 0 comments

by hooking into the gc callbacks, we could gather stats on the CPU time spent in the garbage collector (which I suspect is non-trivial), the frequency of garbage-collections, the number of objects being collected, etc.

Synapse currently does the same by disabling automatic GC and periodically running the GC manually https://github.com/matrix-org/synapse/blob/v1.33.0/synapse/metrics/init.py#L589) but I think we can achieve the same thing more elegantly via the callback hooks.

It would be nice to stick this in a library of prometheus extensions.

richvdh avatar May 07 '21 11:05 richvdh