Skip to content

Conversation

@edwintorok
Copy link
Contributor

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).

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>
@edwintorok
Copy link
Contributor Author

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.

Copy link
Contributor

@lindig lindig left a 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
Copy link
Contributor

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>
@lindig
Copy link
Contributor

lindig commented Dec 17, 2021

Maybe there is a way to fit this in: the number of used file descriptors would be another useful stat.

@robhoes
Copy link
Member

robhoes commented Mar 13, 2023

Does this PR have a future? Is it still possible to rebase it?

@edwintorok
Copy link
Contributor Author

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.

@edwintorok
Copy link
Contributor Author

Moved to xapi-project/xen-api#5522

@edwintorok edwintorok closed this Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants