shiichan

ECS Managed Instances Now Repacks Tasks Across Instances: 19 Down to 13

Hi everyone, it's Shii-chan!

AWS What's New aws.amazon.com

Here's an update that trims your container costs automatically!

What was announced?

AWS announced two infrastructure optimization updates for Amazon ECS Managed Instances:

  • Cross-instance consolidation: evaluates tasks across multiple underutilized instances together and packs them onto fewer instances to raise utilization and lower cost
  • Spot consolidation: extends this to Spot capacity, consolidating underutilized Spot Instances after first verifying that replacement capacity is available

The story so far

ECS Managed Instances provisions, configures, and operates right-sized Amazon EC2 instances for your workloads. Its infrastructure optimization continuously reclaims idle capacity and consolidates underutilized instances with graceful start-before-stop task replacement.

Until now, it evaluated each instance in isolation for replacement. That worked well with diverse instance types, but with a narrow range of instance types in the capacity provider, no single replacement could yield savings, so there were fewer chances to consolidate.

What changes

ECS now evaluates and repacks tasks across multiple instances at once. Even narrow instance-type setups can find savings.

Dive Deep

AWS gave a concrete test example:

  • Setup: a capacity provider with c9g instances and a 4xlarge minimum size
  • Workload: 261 tasks (each 1 vCPU, 1.94 GiB)
  • Before: 19 instances (seven 4xlarge, seven 8xlarge, four 12xlarge, one 24xlarge)
  • After: 13 instances (eight 4xlarge, five 8xlarge)
  • CPU utilization: from 42% to 91%
  • Memory utilization: from 41% to 88%

Both features are available at no additional cost in all AWS Regions. They apply automatically to existing and new ECS Managed Instances capacity providers, and the announcement doesn't mention separate setup. See the infrastructure optimization section of the ECS developer guide for details.

Wrap-up

  • Cross-instance consolidation repacks tasks across several underutilized instances
  • Spot consolidation checks replacement capacity first
  • In the test, 19 instances became 13 and CPU utilization went from 42% to 91%
  • No extra cost, all Regions, applied automatically to existing setups

This is for platform folks who want to cut ECS compute spend!