Comments (1)
您提供的文本包含了对Horizontal Pod Autoscaler (HPA) 工作原理的详细解释以及一些具体的数学公式。以下是格式化后的数学公式:
公式:
[
\text{desiredReplicas} = \left\lceil \text{currentReplicas} \times \left( \frac{\text{currentMetricValue}}{\text{desiredMetricValue}} \right) \right\rceil
]
这个公式用于计算基于当前指标值和期望指标值的期望副本数,ceil
表示向上取整。
分析 CPU
从2个副本缩容到1个副本的条件 375%:
[
\text{desiredReplicas} = \left\lceil 2 \times \left( \frac{375}{750} \right) \right\rceil = \left\lceil 0.5 \right\rceil = 1
]
分析 Memory
从2个副本缩容到1个副本的条件 40%:
[
\text{desiredReplicas} = \left\lceil 2 \times \left( \frac{40}{80} \right) \right\rceil = \left\lceil 0.5 \right\rceil = 1
]
CPU 扩容和缩容的触发条件
- 从1个副本扩容到2个副本的条件 825%:
[
\text{desiredReplicas} = \left\lceil 1 \times \left( \frac{825}{750} \right) \right\rceil = \left\lceil 1.1 \right\rceil = 2
]
- 从2个副本扩容到3个副本的条件 825%:
[
\text{desiredReplicas} = \left\lceil 2 \times \left( \frac{825}{750} \right) \right\rceil = \left\lceil 2.2 \right\rceil = 3
]
- 从3个副本缩容到2个副本的条件 500%:
[
\text{desiredReplicas} = \left\lceil 3 \times \left( \frac{500}{750} \right) \right\rceil = \left\lceil 3 \times 0.6666 \right\rceil = 2
]
- 从2个副本缩容到1个副本的条件 375%:
[
\text{desiredReplicas} = \left\lceil 2 \times \left( \frac{375}{750} \right) \right\rceil = \left\lceil 2 \times 0.5 \right\rceil = 1
]
Memory扩容和缩容的触发条件
- 从1个副本扩容到2个副本的条件 88%:
[
\text{desiredReplicas} = \left\lceil 1 \times \left( \frac{88}{80} \right) \right\rceil = \left\lceil 1.1 \right\rceil = 2
]
- 从2个副本扩容到3个副本的条件 88%:
[
\text{desiredReplicas} = \left\lceil 2 \times \left( \frac{88}{80} \right) \right\rceil = \left\lceil 2.2 \right\rceil = 3
]
- 从3个副本缩容到2个副本的条件 53%:
[
\text{desiredReplicas} = \left\lceil 3 \times \left( \frac{53}{80} \right) \right\rceil = \left\lceil 1.9875 \right\rceil = 2
]
- 从2个副本缩容到1个副本的条件 40%:
[
\text{desiredReplicas} = \left\lceil 2 \times \left( \frac{40}{80} \right) \right\rceil = \left\lceil 1 \right\rceil = 1
]
请注意,这些公式是根据您的描述进行格式化的,确保它们在您的环境中正确显示可能需要一些调整。
from groovy.
Related Issues (20)
- DR
- network policy
- - Create GKE by Terraform
- Nginx remoteip HOT 3
- Sa
- Network policy HOT 1
- 如何设置BigQuery触发器以发送告警?
- Buildkit
- Ingress HOT 13
- Monitor
- OSA
- Illumio
- Hpa memory HOT 2
- Hpa HOT 7
- Auth gcp HOT 3
- UIG
- nodeAffinity HOT 2
- Hpa HOT 1
- Token HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from groovy.