Application Performance Optimization on Kubernetes: More Than Just Pods

by Scott Moore

June 25, 2025

Share this post

Application Performance Optimization on Kubernetes: More Than Just Pods

In 2025, Kubernetes dominates the cloud container landscape. It is the “operating system of the cloud.” Yet many organizations are discovering how expensive it is to run and scale. OOM kills anyone?

Application performance optimization on Kubernetes usually stops at pod requests and limits. That misses the layer where most waste and most reliability risk actually live: the application runtime. Tuning the JVM, Node.js V8, .NET CLR, or Go runtime alongside pod and node settings is what turns Kubernetes cost and reliability around.

Overprovisioning to avoid an outage costs companies far more than they budgeted when they first migrated to containers. Many teams right-size pods and tune cluster resources to fix it. Most still miss the fundamental layer that holds the key to poor reliability and overspending: the language runtime of the application itself. As a result, they leave money on the table and suffer avoidable reliability incidents.

Modern applications do not run directly on Kubernetes. They execute on language runtimes like the Java Virtual Machine, the Node.js V8 engine, the .NET CLR, or the Go runtime. None of these is “tuned” out of the gate. Each exposes an intimidating number of options for memory allocation, garbage collection, thread management, and compilation. Each setting can make a large difference in performance and resource use. This area gets ignored because the platform teams that deploy the applications focus on Kubernetes, not on the applications themselves.

Chart showing Java 21 exposes 537 JVM configuration options for memory, GC, threads, and compilation
Java 21 has an outstanding 537 configuration options. How many are you actually setting?

The Hidden Costs of Pod-Only Kubernetes Optimization

The main approach SREs and platform teams use today is tuning pod requests and limits. That instinct is right, because applications are where most of the waste comes from. The execution is misguided. It looks only at Kubernetes metrics like pod-level CPU and memory. What happens inside the application is treated as someone else’s problem.

Tuning at that level is genuinely hard. The right configuration is specific per application and demands a granular view. Focusing on infrastructure alone produces three problems we see as a pattern at Akamas.

Memory Misconfiguration Leads to Cascading Failures

Consider a typical Java application in a Kubernetes pod. Infrastructure monitoring shows the pod steadily uses 2GB, so a tool recommends cutting the limit from 4GB to 2.5GB for savings. That recommendation ignores the JVM heap configuration, which may be set to use up to 3GB based on the original 4GB limit.

The result? A slight traffic increase pushes the JVM to use all the allocated heap, and Kubernetes kills the pod. These reliability problems are invisible in infrastructure metrics until it is too late.

Diagram of a Kubernetes pod getting OOMKilled when the JVM heap exceeds a reduced pod memory limit

Auto-Configuration Creates Performance Cliffs

Java’s runtime reacts to your pod resources. Reduce a pod’s allocation and the runtime adjusts its own parameters. The JVM shrinks the heap, changes garbage collection behavior, and modifies thread pool sizes.

These automatic adjustments often create problems. A slightly smaller memory limit can shrink the JVM heap. That triggers far more frequent garbage collection, which burns CPU and raises latency. The Node.js V8 engine behaves the same way. Memory pressure there can cause dramatic swings in resource use and execution performance.

Diagram showing a smaller pod memory limit forcing a smaller JVM heap and more frequent garbage collection

Efficiency Gains Require Runtime Tuning

Right-sizing infrastructure removes some waste. It does not make the application more efficient. True efficiency comes from optimizing how the runtime uses resources. Developers routinely set Java heap far higher than the application needs. Properly sizing the heap can cut the memory footprint in half, with the same performance. Different garbage collection algorithms in the JVM can vary CPU usage by 30% for identical workloads. The default V8 settings are tuned for browsers, not for the high-throughput server workloads that Node.js runs.

Tune the runtime parameters and you often get the same performance with far fewer resources. You can also get more performance from the same allocation. Sometimes the result shows up as a welcome drop on the monthly cloud invoice. This level of optimization is impossible without understanding the application layer.

Chart showing lower monthly cloud cost after tuning application runtime memory and garbage collection

How Runtime Config Breaks Kubernetes Autoscaling

Optimization gets harder once Kubernetes autoscaling enters the picture. Horizontal Pod Autoscaling acts on the metrics and thresholds you define. If the runtime is poorly configured and out of step with pod requests and limits, these systems scale wrong. You get an excessive pod count that triggers unnecessary cluster scale-out, or under-provisioning that degrades performance.

Diagram of Kubernetes HPA and cluster autoscaler scaling incorrectly because of a misconfigured application runtime
There’s more to Kubernetes scaling than meets the eye.

Node selection is another challenge. Should the workload run on compute-optimized instances with a high CPU-to-memory ratio, or memory-optimized instances with more RAM per core? The answer depends on the workload’s resource shape, which is driven mainly by the runtime configuration. Kubernetes cluster autoscalers can match provisioned resources to requests. Turning one on is not enough on its own. Your node group configuration is what makes node shapes match your workloads.

Multiply these decisions across hundreds of microservices, each with different runtime needs and resource patterns. Manual optimization is not practical at that scale. When automated tools ignore the application layer, that blind spot guarantees overspending and reliability incidents.

Beyond Infrastructure Metrics: Application-Aware Optimization

Application performance optimization requires analyzing application metrics alongside infrastructure utilization. That means response times, throughput, error rates, garbage collection frequency, and more. You need the application-layer context that infrastructure metrics alone cannot give you.

This is why application-aware optimization is essential to any sound Kubernetes optimization strategy. It also enables real collaboration between platform engineering, SREs, and developers, which produces more efficient and more reliable applications.

An optimization tool that sees both layers at once shows you what you have been missing. A pod can show low CPU at the infrastructure level while suffering high garbage collection overhead that consumes CPU cycles inefficiently. A traditional tool recommends cutting CPU. An application-aware tool fixes the garbage collection stress instead.

The payoff is that you improve cost efficiency and application performance together. You stop choosing between saving money and holding performance. You get both.

The Path Forward: Full-Stack Performance and Cost Gains

Organizations that use Akamas consistently report significant improvements, sometimes dramatic ones. In Akamas customer engagements, cost reductions of 20-50% are common when application tuning is combined with infrastructure optimization. Misconfigurations that cause reliability issues get identified and fixed fast. Performance gains often exceed the cost savings, with response-time reductions of 30% that are not uncommon. Akamas often pays for itself in the early stages of tuning.

Instead of fighting resource constraints and performance issues, teams can proactively tune their specific Kubernetes environment for their own applications. Teams that adopt application-aware optimization end up with more efficient, more reliable, and more cost-effective Kubernetes deployments.

Ready to see how much performance and cost your Kubernetes applications are leaving on the table? Learn more about full-stack optimization for your organization.

FAQs

What is application performance optimization on Kubernetes?

It is tuning the application runtime, the pod settings, and the cloud nodes together, not in isolation. Most teams tune only pods. This approach also tunes the JVM, V8, or .NET CLR the application runs on, which is where much of the waste and reliability risk lives.

Why is pod rightsizing not enough to reduce Kubernetes cost?

Pod rightsizing looks at pod-level CPU and memory, not at what happens inside the runtime. A pod can look efficient while the JVM wastes CPU on garbage collection. Rightsizing alone can also shrink the heap and trigger OOM kills. Runtime tuning is what removes the underlying waste.

What happens to the JVM when you lower a pod’s memory limit?

The JVM reacts to the resources it sees. A smaller limit shrinks the heap, which can trigger far more frequent garbage collection, higher CPU use, and increased latency. Below a threshold, the pod gets OOMKilled. This is why heap settings must be tuned together with pod limits.

How much can runtime tuning reduce Kubernetes cost?

In Akamas customer engagements, combining application tuning with infrastructure optimization commonly cuts cost 20-50%. Properly sizing the JVM heap alone can halve the memory footprint at equal performance, and choosing the right garbage collector can shift CPU usage by around 30% for the same workload.

Which application runtimes can be optimized this way?

The same approach applies to the Java Virtual Machine, the Node.js V8 engine, the .NET CLR, and the Go runtime. Each exposes many options for memory, garbage collection, threading, and compilation. Java 21 alone has 537 configuration options.

Akamas named a Leader in the GigaOm Radar for Cloud Resource Optimization v5, 2026
Akamas named an Outperformer in the GigaOm Radar for Cloud Resource Optimization v5, 2026

See for Yourself

Experience the benefits of Akamas autonomous optimization.
No overselling, no strings attached, no commitments.