Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Fix the minimum memory reservation limitation for Docker change #185

Merged
merged 2 commits into from
Oct 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion doc_source/task_definition_parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ Required: no
The amount \(in MiB\) of memory to present to the container\. If your container attempts to exceed the memory specified here, the container is killed\. The total amount of memory reserved for all containers within a task must be lower than the task `memory` value, if one is specified\. This parameter maps to `Memory` in the [Create a container](https://docs.docker.com/engine/api/v1.38/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.docker.com/engine/api/v1.38/) and the `--memory` option to [https://docs.docker.com/engine/reference/commandline/run/](https://docs.docker.com/engine/reference/commandline/run/)\.
If using the Fargate launch type, this parameter is optional\.
If using the EC2 launch type, you must specify either a task\-level memory value or a container\-level memory value\. If you specify both a container\-level `memory` and `memoryReservation` value, `memory` must be greater than `memoryReservation`\. If you specify `memoryReservation`, then that value is subtracted from the available memory resources for the container instance on which the container is placed\. Otherwise, the value of `memory` is used\.
The Docker 20.10.0 or later daemon reserves a minimum of 6 MiB of memory for a container, so you should not specify fewer than 6 MiB of memory for your containers\.
The Docker 19.03.13-ce or earlier daemon reserves a minimum of 4 MiB of memory for a container, so you should not specify fewer than 4 MiB of memory for your containers\.
The Docker 20\.10\.0 or later daemon reserves a minimum of 6 MiB of memory for a container, so you should not specify fewer than 6 MiB of memory for your containers\.
The Docker 19\.03\.13\-ce or earlier daemon reserves a minimum of 4 MiB of memory for a container, so you should not specify fewer than 4 MiB of memory for your containers\.
If you are trying to maximize your resource utilization by providing your tasks as much memory as possible for a particular instance type, see [Container Instance Memory Management](memory-management.md)\.
Expand All @@ -139,6 +141,7 @@ For example, if your container normally uses 128 MiB of memory, but occasionally
The Docker 20\.10\.0 or later daemon reserves a minimum of 6 MiB of memory for a container, so you should not specify fewer than 6 MiB of memory for your containers\.
The Docker 19\.03\.13\-ce or earlier daemon reserves a minimum of 4 MiB of memory for a container, so you should not specify fewer than 4 MiB of memory for your containers\.


#### Port mappings<a name="container_definition_portmappings"></a>

`portMappings`
Expand Down Expand Up @@ -1116,4 +1119,4 @@ The process namespace to use for the containers in the task\. The valid values a
If the `host` PID mode is used, be aware that there is a heightened risk of undesired process namespace exposure\. For more information, see [Docker security](https://docs.docker.com/engine/security/security/)\.

**Note**
This parameter is not supported for Windows containers or tasks using the Fargate launch type\.
This parameter is not supported for Windows containers or tasks using the Fargate launch type\.