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

Merge Feature/task-resource-accounting to dev #3757

Merged
merged 7 commits into from
Jun 22, 2023

Conversation

prateekchaudhry
Copy link
Contributor

@prateekchaudhry prateekchaudhry commented Jun 21, 2023

Summary

This feature implements task resource accounting in agent.

  • It removes task serialization where a task would wait for previous stopping tasks before progressing
  • It implements a host resource manager which keeps account of tasks which have 'taken' resources on the host. A running task frees resources with host resource manager on emitting it's change of status to STOPPED to ECS backend. Tasks waiting for resources will wait in a queue until enough resources for them become available. Current resources being tracked are cpu, memory, ports (tcp/udp) and number of gpus.

Implementation details

#3684 Host Resource Manager initialization
#3706 Add method to get host resources reserved for a task
#3700 Add host resource manager methods
#3723 Remove task serialization and use host resource manager for task resources
#3741 Add integ tests for task accounting
#3747 Change reconcile/container update order on init and waitForHostResources/emitCurrentStatus order
#3750 Dont consume host resources for tasks getting STOPPED while waiting in waitingTasksQueue

Related Containers Roadmap Issue

aws/containers-roadmap#325

Testing

Manual verification along with unit tests, integ tests and functional tests in the mentioned PRs to check methods and functional behavior

New tests cover the changes:
Yes

Description for the changelog

Add task resource accounting in ECS Agent

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@danehlim danehlim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed and confirmed manual verification done for this PR offline, PR LGTM.

@prateekchaudhry prateekchaudhry merged commit 8b96a11 into dev Jun 22, 2023
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.

4 participants