foundationdb icon indicating copy to clipboard operation
foundationdb copied to clipboard

Collect cpu.stat metrics in trace logs

Open johscheuer opened this issue 3 years ago • 2 comments

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

johscheuer avatar Aug 22 '22 13:08 johscheuer

If these stats cannot be tied to a particular FDB process, something like MachineMetrics may be better

sfc-gh-abeamon avatar Aug 29 '22 16:08 sfc-gh-abeamon

This is the measurement for all processes in a cgroup. So I will add it to MachineMetrics

xumengpanda avatar Aug 30 '22 17:08 xumengpanda