Kubernetes CPU Profiling

Always-on CPU Profiling, without the overhead

Get detailed CPU profiles and stacktraces automatically for all containers in your cluster. Investigate performance regressions, usage pattern changes, and environment impacts with function-level visibility.

Comprehensive Profiling

Understand performance down to the function level

Continuous Sampling

97Hz sampling rate provides detailed insights with minimal overhead - sub 0.5% CPU usage.

Multi-Language Support

Full function level tracing support for C, C++, Rust, Golang, and Python, with kernel level insights for other languages.

Built for Kubernetes

Profile at the container level: slice and dice across clusters, namespaces, and services.

1 minute install

Zero Setup Required

We mean it. No code changes, no restarts. Metoro automatically collects CPU profiles for all containers running in your cluster using eBPF. Just install the agent into your cluster and see your profiles in Metoro.

Performance Analysis

Investigate performance regressions after code releases, changes in usage patterns, or environment changes with function-level visibility.

Stacktrace Analysis

Get detailed stacktraces showing exactly where CPU time is being spent in your applications, down to the function level.

Flexible Filtering

Filter profiles by specific containers or clusters. View aggregated profiles across all pods associated with your services.

Always-On

Sometimes things happen. There's an issue, it resolves itself. You couldn&pos;t run diagnostics. You're left wondering why your application is slow. Metoro is always on, you'll never miss a moment.

Cost Effective

Save on Your Observability Costs

Metoro gives your profiling for free as part of APM. No additional cost for CPU profiling.

Example monthly cost comparison - APM + CPU Profiling

Based on typical start-up usage.

Hosts

Avg per month

Containers

Avg per month

Profiles

GB / Month
Datadog
$960/month
Grafana Cloud
$725/month
Metoro
$400/month

* Approximate cost. Precise costs depend on the specific use case and any discounts.

** Updated 1st December 2024. Datadog Enterprise APM required for profiling. Assumes monthly billing.

Technical Deep Dive

How does it work?

Metoro's injects an eBPF profiler into the kernel to collect CPU samples at 97Hz. Every ~10 milliseconds, the profiler looks at what is running on the CPU at that moment.

How does the profiler work?

At each profiling interval, the profiler looks at the currently running instruction on each core of the CPU. Based on that instruction, it unwinds the stack trace and sends it out to Metoro. Then when you query Metoro, we aggregate all of those stack traces together to give you a complete picture of what your application is doing.

Why eBPF?

  • Low overhead: The profiler typically adds less than 0.5% CPU overhead, making it suitable for production environments.
  • No application changes required: No need to get every dev to integrate a new sdk or change their code to collect profiling data. Just install the agent, you don't even need to restart your containers.

Ready to get started?

Start monitoring your Kubernetes applications in minutes with zero configuration required.

Frequently Asked Questions About K8s CPU Profiling

A CPU profile is a list of stacktraces and time spent at each stack trace. Metoro aggregates these lists together to show you exactly which functions your program is spending time in.

Metoro runs a sampling profiler at 97Hz to understand exactly which container is running on each CPU on a host. This allows us to collect stacktraces of any program currently on the CPU, giving you detailed insights into where CPU time is being spent.

Metoro currently supports CPU profiling for C, C++, Rust, Golang, and Python. For other languages, we show their native runtime methods, though CPU time won't be attributed to the interpreted function itself.

Running the sampling profiler has minimal overhead, typically less than 0.5% of total CPU usage. This ensures that our profiling solution doesn't significantly impact your application's performance.

You can view CPU profiles for each service in its respective service page under the Profiling tab. This provides an aggregated view of all profiles taken across all pods associated with the service in your selected time period. You can filter by specific container in the pod or by cluster.

CPU profiling focuses on understanding how CPU time is spent in your application, whereas other types of profiling, such as memory profiling, focus on understanding how memory is allocated and used. CPU profiling is particularly useful for identifying performance bottlenecks and optimizing application performance.