SlideShare a Scribd company logo
Optimizing Application
Performance on
Kubernetes
Dinakar Guniguntala @dinogun
Runtimes Cloud Architect, IBM
@dinogun 2
“When you interact with IBM, this serves as your
authorization to Saltmarch Media India Pvt. Ltd. or its
vendor to provide your contact information to IBM in order
for IBM to follow up on your interaction.  IBM's use of your
contact information is governed by the IBM Privacy Policy. “
@dinogun 3
Kubernetes is a portable,
extensible, open-source
platform for managing
containerized workloads
and services, that facilitates
both declarative configuration
… blah blah blah
Kitna Deti Hai ?*
Any questions ?
* What's the mileage ?
@dinogun 4
●
Throughput
●
Response Time
●
Utilization
@dinogun 5
Public
Private
Public
Public
@dinogun 6
BIOS
●
CPU Power and Performance Policy: <Performance>
OS / Hypervisor
●
CPU Scaling governor: <Performance>
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
performance powersave
$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Performance
Hyperthreading
●
Do not count hyperthreading while capacity planning
Don’t forget the hardware !
@dinogun 7
What is the granularity of observation ?
●
Trade-off between accurate info and overhead
Additional Operational Info
●
Spring Actuator
●
HealthCenter
Observability
@dinogun 8
QoS classes
Guaranteed
Burstable
BestEffort
Right Size !apiVersion: apps/v1
kind: Deployment
metadata:
name: acmeair
labels:
app: acmeair-app
spec:
replicas: 1
selector:
matchLabels:
app: acmeair-deployment
template:
metadata:
labels:
name: acmeair-deployment
app: acmeair-deployment
app.kubernetes.io/name: "acmeair-mono"
version: v1
spec:
volumes:
- name: test-volume
hostPath:
path: "/root/icp/jLogs"
type: ""
containers:
- name: acmeair-libertyapp
image: dinogun/acmeair-monolithic
imagePullPolicy: Always
ports:
- containerPort: 8080
resources:
requests:
memory: 500M
cpu: 2
limits:
memory: 1024M
cpu: 3
volumeMounts:
- name: "test-volume"
mountPath: "/opt/jLogs"
Ensure LimitRange does not get in
the way of your deployment !
apiVersion: v1
kind: LimitRange
metadata:
name: limit-range
spec:
limits:
- default:
cpu: 1
memory: 512Mi
defaultRequest:
cpu: 0.5
memory: 256Mi
type: Container
Requests → Should cover the observed peaks
Limits → Handle any spikes !
@dinogun 9
HPA, VPA and CAapiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: php-apache
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: php-apache
minReplicas: 1
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50
- type: Pods
pods:
metric:
name: packets-per-second
target:
type: AverageValue
averageValue: 1k
- type: Object
object:
metric:
name: requests-per-second
describedObject:
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
name: main-route
target:
type: Value
value: 10k
Set HPA with app specific metrics
- type: External
external:
metric:
name: concurrent_connections
selector: "connection=current"
target:
type: Value
Value: 1200
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: zk-pdb
spec:
maxUnavailable: 1
selector:
matchLabels:
app: zookeeper
Use PodDisruptionBudget with CA
to ensure no service disruption
@dinogun 10
Kruize
Right size and Optimize your Containers !
https://github.com/kruize/kruize
@dinogun 11
Summary
●
Don’t forget to tune the hardware
●
Observability is key
●
Ensure requests and limits are set for all app pods
●
Use app specific scaling metrics
●
Ensure no disruption with PDB
●
Kruize can help you optimize your runtime
– Eg. JVM tunables such as -XX:MaxRAMPercentage
@dinogun
12
Discount kitna
milega ?*
?!!!!
Questions → @dinogun
* Something tells me that doesn’t need to be translated !!

More Related Content

PDF
DevoxxUK: Optimizating Application Performance on Kubernetes
PDF
Optimizing {Java} Application Performance on Kubernetes
PPTX
Adding Security to your SLO-based Release Validation with Keptn
PDF
Streaming millions of Contact Center interactions in (near) real-time with Pu...
PDF
Senlin deep dive 2016
PDF
High Performance TensorFlow in Production - Big Data Spain - Madrid - Nov 15 ...
PPTX
Monitoring kubernetes with prometheus-operator
PDF
Hyper-Parameter Tuning Across the Entire AI Pipeline GPU Tech Conference San ...
DevoxxUK: Optimizating Application Performance on Kubernetes
Optimizing {Java} Application Performance on Kubernetes
Adding Security to your SLO-based Release Validation with Keptn
Streaming millions of Contact Center interactions in (near) real-time with Pu...
Senlin deep dive 2016
High Performance TensorFlow in Production - Big Data Spain - Madrid - Nov 15 ...
Monitoring kubernetes with prometheus-operator
Hyper-Parameter Tuning Across the Entire AI Pipeline GPU Tech Conference San ...

What's hot (18)

PPTX
Orchestration tool roundup - OpenStack Israel summit - kubernetes vs. docker...
PDF
Building Google Cloud ML Engine From Scratch on AWS with PipelineAI - ODSC Lo...
PPTX
Deploy an Elastic, Resilient, Load-Balanced Cluster in 5 Minutes with Senlin
PDF
Optimize + Deploy Distributed Tensorflow, Spark, and Scikit-Learn Models on GPUs
PDF
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
PDF
Senlin Clustering Service Deep Dive
PDF
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
PPTX
Senlin deep dive 2015 05-20
PDF
High Performance Distributed TensorFlow with GPUs - TensorFlow Chicago Meetup...
PDF
-XX:+UseG1GC
PDF
Consumer offset management in Kafka
PDF
Spark SQL Catalyst Optimizer, Custom Expressions, UDFs - Advanced Spark and T...
PDF
Content Caching with NGINX and NGINX Plus
DOCX
Lab3 advanced port scanning 30 oct 21
PPT
Kafka Reliability - When it absolutely, positively has to be there
PDF
Quarkus - a shrink ray to your Java Application
PPTX
Java profiling Do It Yourself (jug.msk.ru 2016)
PDF
Optimize + Deploy Distributed Tensorflow, Spark, and Scikit-Learn Models on G...
Orchestration tool roundup - OpenStack Israel summit - kubernetes vs. docker...
Building Google Cloud ML Engine From Scratch on AWS with PipelineAI - ODSC Lo...
Deploy an Elastic, Resilient, Load-Balanced Cluster in 5 Minutes with Senlin
Optimize + Deploy Distributed Tensorflow, Spark, and Scikit-Learn Models on GPUs
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Senlin Clustering Service Deep Dive
Apache MXNet Distributed Training Explained In Depth by Viacheslav Kovalevsky...
Senlin deep dive 2015 05-20
High Performance Distributed TensorFlow with GPUs - TensorFlow Chicago Meetup...
-XX:+UseG1GC
Consumer offset management in Kafka
Spark SQL Catalyst Optimizer, Custom Expressions, UDFs - Advanced Spark and T...
Content Caching with NGINX and NGINX Plus
Lab3 advanced port scanning 30 oct 21
Kafka Reliability - When it absolutely, positively has to be there
Quarkus - a shrink ray to your Java Application
Java profiling Do It Yourself (jug.msk.ru 2016)
Optimize + Deploy Distributed Tensorflow, Spark, and Scikit-Learn Models on G...
Ad

Similar to Optimizing Application Performance on Kubernetes (20)

PDF
August-20_Autoscaling-and-Cost-Optimization-on-Kubernetes-From-0-to-100.pdf
PDF
Why Kubernetes Freedom Requires Chaos Engineering to Shine in Production
PDF
From Containerized Application to Secure and Scaling With Kubernetes
PDF
GDG Cloud Southlake #20:Stefano Doni: Kubernetes performance tuning dilemma: ...
PDF
When Less is More - Save Brain Cycles with GKE Autopilot and Cloud Run
PPTX
KCD PPT -2025 - Kasun Rathnayaka (2).pptx
PPTX
Kubernetes go-live checklist for your microservices.pptx
PDF
Put the ‘Auto’ in Autoscaling – Make Kubernetes VPA and HPA work together for...
PDF
Autoscaling in kubernetes v1
PDF
kubernetes_largescale_system_design_optimization
PPTX
Kube con china_2019_7 missing factors for your production-quality 12-factor apps
PPTX
9 ways to consume kubernetes on open stack in 15 mins (k8s meetup)
PDF
Crossplane and a story about scaling Kubernetes custom resources.pdf
PPTX
Autoscaling with Kubernetes
PDF
Blue turns green! Approaches and technologies for sustainable K8s clusters #C...
PDF
Kubernetes: Beyond Baby Steps
PDF
20180503 kube con eu kubernetes metrics deep dive
PDF
Google Kubernetes Engine Deep Dive Meetup
PDF
Simplify and Boost Spark 3 Deployments with Hypervisor-Native Kubernetes
PDF
KubeCon Prometheus Salon -- Kubernetes metrics deep dive
August-20_Autoscaling-and-Cost-Optimization-on-Kubernetes-From-0-to-100.pdf
Why Kubernetes Freedom Requires Chaos Engineering to Shine in Production
From Containerized Application to Secure and Scaling With Kubernetes
GDG Cloud Southlake #20:Stefano Doni: Kubernetes performance tuning dilemma: ...
When Less is More - Save Brain Cycles with GKE Autopilot and Cloud Run
KCD PPT -2025 - Kasun Rathnayaka (2).pptx
Kubernetes go-live checklist for your microservices.pptx
Put the ‘Auto’ in Autoscaling – Make Kubernetes VPA and HPA work together for...
Autoscaling in kubernetes v1
kubernetes_largescale_system_design_optimization
Kube con china_2019_7 missing factors for your production-quality 12-factor apps
9 ways to consume kubernetes on open stack in 15 mins (k8s meetup)
Crossplane and a story about scaling Kubernetes custom resources.pdf
Autoscaling with Kubernetes
Blue turns green! Approaches and technologies for sustainable K8s clusters #C...
Kubernetes: Beyond Baby Steps
20180503 kube con eu kubernetes metrics deep dive
Google Kubernetes Engine Deep Dive Meetup
Simplify and Boost Spark 3 Deployments with Hypervisor-Native Kubernetes
KubeCon Prometheus Salon -- Kubernetes metrics deep dive
Ad

Recently uploaded (20)

PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Nekopoi APK 2025 free lastest update
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
ai tools demonstartion for schools and inter college
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
System and Network Administration Chapter 2
PDF
System and Network Administraation Chapter 3
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
L1 - Introduction to python Backend.pptx
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Reimagine Home Health with the Power of Agentic AI​
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Odoo POS Development Services by CandidRoot Solutions
Nekopoi APK 2025 free lastest update
Design an Analysis of Algorithms I-SECS-1021-03
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
How Creative Agencies Leverage Project Management Software.pdf
PTS Company Brochure 2025 (1).pdf.......
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
ai tools demonstartion for schools and inter college
Understanding Forklifts - TECH EHS Solution
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
System and Network Administration Chapter 2
System and Network Administraation Chapter 3
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
2025 Textile ERP Trends: SAP, Odoo & Oracle
L1 - Introduction to python Backend.pptx
How to Choose the Right IT Partner for Your Business in Malaysia
Reimagine Home Health with the Power of Agentic AI​

Optimizing Application Performance on Kubernetes

  • 1. Optimizing Application Performance on Kubernetes Dinakar Guniguntala @dinogun Runtimes Cloud Architect, IBM
  • 2. @dinogun 2 “When you interact with IBM, this serves as your authorization to Saltmarch Media India Pvt. Ltd. or its vendor to provide your contact information to IBM in order for IBM to follow up on your interaction.  IBM's use of your contact information is governed by the IBM Privacy Policy. “
  • 3. @dinogun 3 Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration … blah blah blah Kitna Deti Hai ?* Any questions ? * What's the mileage ?
  • 6. @dinogun 6 BIOS ● CPU Power and Performance Policy: <Performance> OS / Hypervisor ● CPU Scaling governor: <Performance> $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors performance powersave $ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor Performance Hyperthreading ● Do not count hyperthreading while capacity planning Don’t forget the hardware !
  • 7. @dinogun 7 What is the granularity of observation ? ● Trade-off between accurate info and overhead Additional Operational Info ● Spring Actuator ● HealthCenter Observability
  • 8. @dinogun 8 QoS classes Guaranteed Burstable BestEffort Right Size !apiVersion: apps/v1 kind: Deployment metadata: name: acmeair labels: app: acmeair-app spec: replicas: 1 selector: matchLabels: app: acmeair-deployment template: metadata: labels: name: acmeair-deployment app: acmeair-deployment app.kubernetes.io/name: "acmeair-mono" version: v1 spec: volumes: - name: test-volume hostPath: path: "/root/icp/jLogs" type: "" containers: - name: acmeair-libertyapp image: dinogun/acmeair-monolithic imagePullPolicy: Always ports: - containerPort: 8080 resources: requests: memory: 500M cpu: 2 limits: memory: 1024M cpu: 3 volumeMounts: - name: "test-volume" mountPath: "/opt/jLogs" Ensure LimitRange does not get in the way of your deployment ! apiVersion: v1 kind: LimitRange metadata: name: limit-range spec: limits: - default: cpu: 1 memory: 512Mi defaultRequest: cpu: 0.5 memory: 256Mi type: Container Requests → Should cover the observed peaks Limits → Handle any spikes !
  • 9. @dinogun 9 HPA, VPA and CAapiVersion: autoscaling/v2beta2 kind: HorizontalPodAutoscaler metadata: name: php-apache spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: php-apache minReplicas: 1 maxReplicas: 10 metrics: - type: Resource resource: name: cpu target: type: Utilization averageUtilization: 50 - type: Pods pods: metric: name: packets-per-second target: type: AverageValue averageValue: 1k - type: Object object: metric: name: requests-per-second describedObject: apiVersion: networking.k8s.io/v1beta1 kind: Ingress name: main-route target: type: Value value: 10k Set HPA with app specific metrics - type: External external: metric: name: concurrent_connections selector: "connection=current" target: type: Value Value: 1200 apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: name: zk-pdb spec: maxUnavailable: 1 selector: matchLabels: app: zookeeper Use PodDisruptionBudget with CA to ensure no service disruption
  • 10. @dinogun 10 Kruize Right size and Optimize your Containers ! https://github.com/kruize/kruize
  • 11. @dinogun 11 Summary ● Don’t forget to tune the hardware ● Observability is key ● Ensure requests and limits are set for all app pods ● Use app specific scaling metrics ● Ensure no disruption with PDB ● Kruize can help you optimize your runtime – Eg. JVM tunables such as -XX:MaxRAMPercentage
  • 12. @dinogun 12 Discount kitna milega ?* ?!!!! Questions → @dinogun * Something tells me that doesn’t need to be translated !!