5 ms·
Profiling CPU and RAM usage of Rust micro-services running on Kubernetes
- superb-owl 4y agoHonest question: why would you use perf instead of a Kubernetes-native profiler, like metrics-server?
- erwandl 4y agoIf I'm not mistaken, metrics-server (which we also have deployed on our cluster) only gives information about the resource usage and state of the containers and/or pods of your cluster from a high level perspective. It won't give you precise and detailed info about the internals of your application process, ie which functions in your business logic code are responsible for how much CPU or RAM usage. So although metrics-server is very useful in its own right, it doesn't cover all needs and usages.
- superb-owl 4y agoAh yes - good point. I wonder if eBPF would be a good supplement? execing into the running container seems like a very "old world" way of doing things.
- erwandl 4y agoI think eBPF could be interesting in you wanted to do something more advanced, like continuous profiling or things like that (I know Datadog uses eBPF for some of their tracing features), but it would be significantly more complex and would require an engineering time and cost that we do not have in my team. It's true that the proposed approach is quite manual and old-school, but I think it is also one of its biggest advantages: it is dead simple to understand and adapt to your use case.