Skip to content

Commit

Permalink
Merge pull request #7375 from ahardin-rh/update-scenario
Browse files Browse the repository at this point in the history
Bug 1512781, updated the Scenario math
  • Loading branch information
ahardin-rh committed Feb 9, 2018
2 parents 289669e + 328e544 commit 0b172df
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions admin_guide/out_of_resource_handling.adoc
Expand Up @@ -563,7 +563,7 @@ If a node has 10 Gi of capacity, and you want to reserve 10% of that capacity fo

----
capacity = 10 Gi
system-reserved = 10 Gi * .01 = 1 Gi
system-reserved = 10 Gi * .1 = 1 Gi
----

The amount of allocatable resources becomes:
Expand All @@ -575,21 +575,24 @@ allocatable = capacity - system-reserved = 9 Gi
This means by default, the scheduler will schedule pods that request 9 Gi of
memory to that node.

If you want to turn on eviction so that eviction is triggered when the node observes that available memory falls below 10% of capacity for 30 seconds, or
immediately when it falls below 5% of capacity, you need the scheduler to see allocatable as 8Gi. Therefore, ensure your system reservation covers the greater of your eviction thresholds.
If you want to turn on eviction so that eviction is triggered when the node
observes that available memory falls below 10% of capacity for 30 seconds, or
immediately when it falls below 5% of capacity, you need the scheduler to see
allocatable as 8Gi. Therefore, ensure your system reservation covers the greater
of your eviction thresholds.

----
capacity = 10 Gi
eviction-threshold = 10 Gi * .05 = .5 Gi
system-reserved = (10Gi * .01) + eviction-threshold = 1.5 Gi
allocatable = capacity - system-reserved = 8.5 Gi
eviction-threshold = 10 Gi * .1 = 1 Gi
system-reserved = (10Gi * .1) + eviction-threshold = 2 Gi
allocatable = capacity - system-reserved = 8 Gi
----

Enter the following in the *_node-config.yaml_*:
----
kubeletArguments:
system-reserved:
- "8.5Gi"
- "2Gi"
eviction-hard:
- memory.available<.5Gi
eviction-soft:
Expand Down

0 comments on commit 0b172df

Please sign in to comment.