swappiness property
This allows you to tune a container's memory swappiness behavior. A
swappiness value of 0 causes swapping not to
happen unless absolutely necessary. A swappiness value of
100 causes pages to be swapped very aggressively. Accepted
values are whole numbers between 0 and 100. If the
swappiness parameter isn't specified, a default value of
60 is used. If a value isn't specified for maxSwap
then this parameter is ignored. If maxSwap is set to 0, the
container doesn't use swap. This parameter maps to the
--memory-swappiness option to docker run.
Consider the following when you use a per-container swap configuration.
- Swap space must be enabled and allocated on the container instance for the containers to use.
- The swap space parameters are only supported for job definitions using EC2 resources.
-
If the
maxSwapandswappinessparameters are omitted from a job definition, each container will have a defaultswappinessvalue of 60 and the total swap usage will be limited to two times the memory reservation of the container.
Implementation
final int? swappiness;