-
Notifications
You must be signed in to change notification settings - Fork 68
CP-38343: xenopsd GC memory RRD stats #772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
forget_client leaks a thread, it doesn't actually tell it to finish or join it, just sets a global variable to None. We do not actually daemonize anymore (we use systemd), so wrap the forget_client call in an `if !daemon'. Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Draft PR, also need to move this to the xen-api repo, but opening it here as draft first, because it'll be easier to backport to Havana. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more complicated than I would have imagined. My initial idea was to report to syslog such that this will be in bugtools. This is more versatile.
xc/mem_stats.ml
Outdated
open Gc | ||
|
||
let ocaml_total = | ||
let f = kib "ocaml_total" "Total OCaml memory used by %s" in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe field
instead?
Based on xapi_stats.ml, but heavily refactored. Signed-off-by: Edwin Török <edvin.torok@citrix.com>
* drop unused code * add more constants for fields * rename GcStat.compute* (although interestingly the slow/expensive stat is the imprecise one) * rename slow to expensive * fix dssf parameter Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Maybe there is a way to fit this in: the number of used file descriptors would be another useful stat. |
Does this PR have a future? Is it still possible to rebase it? |
We probably don't care about backports to Havana (or even Yangtze) on this anymore, so I'm moving this to the XAPI repo, I think it was basically half approved. |
Moved to xapi-project/xen-api#5522 |
2 rrds: a quick one every 5s, and a slow one every 2.5m (that does the slower Gc.stat and smaps_rollup query).
I tried to be careful with units, not to mix words and KiB (i.e. always convert everything to KiB before doing arithmetic on them), the old xapi stats was buggy in this regard (and had some hardcoded constants based on word-size=32-bit which is no longer true).