Skip to content

Commit

Permalink
docs: improve swap space calculation example
Browse files Browse the repository at this point in the history
since we use percentage units for overcommit, use the same
units in the example. Also since its about overcommit, the
percentage is always higher than 100%

Signed-off-by: Igor Bezukh <[email protected]>
  • Loading branch information
enp0s3 committed May 20, 2024
1 parent 82c6b91 commit 83ac939
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,12 @@ $ oc adm policy add-scc-to-user -n wasp privileged -z wasp
> The amount of swap space to be provisioned on a node must
> be calculated according to the following formula:
>
> NODE_SWAP_SPACE = NODE_RAM * MEMORY_OVER_COMMIT_RATIO
> NODE_SWAP_SPACE = (NODE_RAM * MEMORY_OVER_COMMIT_PERCENTAGE) - NODE_RAM
>
> Example:
> Example (overcommit percentage is always > 100%):
>
> NODE_SWAP_SPACE = (16 GB * 150/100) - 16 GB = 24 GB - 16 GB = 8 GB
>
> NODE_SWAP_SPACE = 16 GB * 150%
> = 16 GB * 0.5
> = 8 GB
Create a `MachineConfig` according to the following
[example](../manifests/machineconfig-add-swap.yaml).
Expand Down

0 comments on commit 83ac939

Please sign in to comment.