foundationdb
foundationdb copied to clipboard
Collect cpu.stat metrics in trace logs
I think it would be useful for FDB deployments in Kubernetes to expose the information from /sys/fs/cgroup/cpu,cpuacct/cpu.stat in the trace events e.g. Type="ProcessMetrics" might be a good candidate. The information from this "file" can be used to determine how long the process was throttled e.g. by using nr_throttled and nr_periods.
Example content:
$ cat /sys/fs/cgroup/cpu,cpuacct/cpu.stat
nr_periods 4846037
nr_throttled 94
throttled_time 56385466163
If these stats cannot be tied to a particular FDB process, something like MachineMetrics may be better
This is the measurement for all processes in a cgroup. So I will add it to MachineMetrics