Skip to content

LiamLea/k8s-resource-optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resource Optimization

Introduction

1.Find Resources

(1) Identify Resources
  • resource id: <namespace>/<controller_type>/<controller_name>/<container_name>

    • why this form:
      • use controller can trace the utilization of an application rather than a pod
  • resource categories

    • common controllers: Deployment, StatefulSet, DaemonSet
    • cron job (TODO)
      • jobs run periodically
(2) Conditions
  • set different conditions for different envs to find qualified resources

  • test env

    • cpu: 95 quantile < requests
    • memory: max < requests
    • duration: 1 week

2.Give Recommendations

  • resource recommendation
    • cpu minimum: 10m
    • memory minimum: 10M
  • resource score
    • score= (cpu_reserved + memory_reserved / (1024*1024*1024*2)) * replicas
      • cpu weight is 1, memory weight is 1/(1024*1024*1024*2) (refer to 1C/2G)

About

Find containers which have less utilization and recommend efficient resource allocation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published