File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
# How is container CPU calculated ?
2
2
Kondense resize each container CPU every second with the following steps.
3
3
4
- ## 1. Calculate average CPU usage of the container.
4
+ ## 1. Calculate container average CPU usage
5
5
Kondense calculate the average CPU usage over the last ` INTERVAL ` seconds. By default, ` INTERVAL ` is 10 seconds.
6
6
7
7
### 2. Calculate new CPU
8
- To calculate the new container CPU, we need the ` TARGET_AVG ` . By default, ` TARGET_AVG ` is 0.8 so 80%.
8
+ We need the ` TARGET_AVG ` to calculate the new container CPU . By default, ` TARGET_AVG ` is 0.8 so 80%.
9
9
10
10
```
11
11
new_cpu = average_cpu / TARGET_AVG
@@ -17,7 +17,7 @@ If `new_cpu` is smaller than the current container limit, we just patch containe
17
17
18
18
### 2.2 If ` new_cpu ` is bigger than current container cpu limit
19
19
20
- If this ` new_cpu ` is higher than the current CPU container limit, we exponentially increase ` new_cpu ` with this formula:
20
+ If ` new_cpu ` is higher than the current CPU container limit, we exponentially increase ` new_cpu ` with this formula:
21
21
```
22
22
new_cpu = new_cpu + (new_cpu * coeff)²
23
23
```
You can’t perform that action at this time.
0 commit comments