Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify the task CPU and memory (IT-4056) #83

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

tschaffter
Copy link
Contributor

Closes https://sagebionetworks.jira.com/browse/IT-4056

Changelog

  • Add a class for specifying valid task CPU and memory pairs.
  • Set container max memory to align with task max memory.

@tschaffter tschaffter self-assigned this Dec 13, 2024
@tschaffter tschaffter marked this pull request as ready for review December 13, 2024 05:06
@tschaffter tschaffter requested review from a team as code owners December 13, 2024 05:06
@tschaffter
Copy link
Contributor Author

I realize that each task must share its resources with two more containers:

  • ecs-service-connect: no CPU and memory limit visible in AWS Console.
  • aws-guardduty-agent: hard max memory limit set to .125 GB.

One solution is to increment the memory made available to the task. The increment is usually 1 GB, which costs $3.20 / month (see Fargate pricing). So for 13 tasks, that about $40 / month / environment or a total of $1440 / year.

Alternatively, we could keep the memory allocated to the tasks as defined in this PR, but reduce the memory allocated to the OC container. Unlike the task definition, containers added to a task can have their memory set freely (no fixed increments) as long as the value is not larger that the memory allocated to the task.

memory_limit_mib (Union[int, float, None]) – The amount (in MiB) of memory to present to the container. If your container attempts to exceed the allocated memory, the container is terminated. At least one of memoryLimitMiB and memoryReservationMiB is required for non-Fargate services. Default: - No memory limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant