INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

Topic lessonTopic: Containers, ECS and Fargate

Fargate CPU and memory: units, valid combinations and sizing decisions

Fargate does not accept arbitrary CPU and memory combinations. First align units, supported pairs, OS and platform-version conditions. Then separate a supported configuration from evidence that it provides enough application performance.

What you will learn

Convert CPU units/vCPU and MiB/table GB, then check Linux examples against ranges, increments and platform conditions.

Prerequisite

A task definition is a revision of execution settings. This exercise covers ECS Linux Fargate task-level sizing. It neither registers nor launches tasks or measures a real application; do not generalize Linux runtime enforcement to Windows.

Separate compatibility, provisioning and performance

Sizing decisions: passing an earlier check does not prove a later outcome
Sizing decisions: passing an earlier check does not prove a later outcome1: Compatibility check — A valid pair still needs launch conditions — Placement and launch. 2: Placement and launch — Verify performance even after launch — Application measurement12Compatibility checkPlacement andlaunchApplicationmeasurementSizing decisions: passing an earlier check does not prove a later outcome1: Compatibility check — A valid pair still needs launch conditions — Placement and launch. 2: Placement and launch — Verify performance even after launch — Application measurement12CompatibilitycheckPlacement andlaunchApplicationmeasurement
  1. Compatibility check → Placement and launchA valid pair still needs launch conditions
  2. Placement and launch → Application measurementVerify performance even after launch
Compatibility check
OS, CPU, memory and platform
Placement and launch
Capacity, quota, IAM and connectivity
Application measurement
Load, latency and memory behavior

Provisioned size is configuration; usage is observed consumption. Configuring 1 vCPU does not establish continuous full utilization. More CPU also need not proportionally reduce latency when waiting on an external API or database is the limiting factor.

Normalize CPU units and memory units

Conversions used in this lesson
SettingConversion/example
CPU1024 CPU units = 1 vCPU; 512 units = 0.5 vCPU.
Numeric memoryThe registered numeric value is MiB; 8192 MiB corresponds to 8 GB in this AWS table.
AWS table notationFollow the documented table conversion: table GB × 1024 = MiB.
Other GB conventionsDo not mix this with decimal GB; verify the input and API units.
S1: a sizing fragment, not a complete task definition
{
  "cpu": "1024",
  "memory": "8192"
}

S1 represents 1 vCPU and 8192 MiB, or 8 GB in this table. It does not mean 1024 CPUs or 8192 GB. These two fields also do not provide the OS, image, permissions, connectivity or other launch requirements.

Check Linux ranges and increments, not just upper bounds

Linux Fargate task CPU/memory combinations
CPU units (vCPU)Supported memoryAdditional condition
256 (0.25)512 MiB, 1 GB, 2 GBLinux
512 (0.5)1, 2, 3, 4 GBLinux
1024 (1)2–8 GB in 1 GB incrementsLinux
2048 (2)4–16 GB in 1 GB incrementsLinux
4096 (4)8–30 GB in 1 GB incrementsLinux
8192 (8)16–60 GB in 4 GB incrementsLinux platform 1.4.0 or later
16384 (16)32–120 GB in 8 GB incrementsLinux platform 1.4.0 or later
32768 (32)60, 120, 244 GBLinux platform 1.4.0 or later
Fixed cases: what table membership does and does not establish
CaseConfigurationTable result
S11024 units / 8192 MiB1 vCPU / 8 GB is listed; launch and performance remain unverified.
S2512 units / 512 MiB0.5 vCPU allows 1–4 GB, not 512 MiB.
S38192 units / 18432 MiB8 vCPU / 18 GB is inside the range but not a permitted 4 GB increment.
S432768 units / 61440 MiB32 vCPU / 60 GB is currently listed; check Linux platform and other conditions.

Windows requires task-level CPU/memory settings, but those values do not enforce collective runtime limits on a container group in the same way as Linux. AWS points to container-level settings for Windows limits. This Linux summary is not a replacement for Windows-specific conditions.

Choose among supported sizes using measurements

  1. Review OS, architecture, platform version and required features.
  2. Normalize units and check supported ranges/increments.
  3. Account for the application, supporting containers and startup work.
  4. In an authorized environment, measure usage, latency and errors under representative load.
  5. Compare peaks, headroom, task count and cost, then remeasure changed settings under comparable conditions.
S5: per-task size and task count are different
Teaching assumptionCalculation and limitation
Three concurrent tasks, each sized as S1Total configured size is 3 vCPU and 24576 MiB (24 table GB).
Meaning of that sumNot measured CPU utilization or requests per second.
CostDuration, OS, Region and supporting services are also needed.

Check units, increments and the limits of the conclusion

Choose an option to see the result and explanation.

How does S2, 512 units / 512 MiB, compare with the Linux table?
Read the answer and reason

Answer: Outside the listed options: 0.5 vCPU starts at 1 GB · 512 units is 0.5 vCPU; do not borrow the 512 MiB option from 256 units.

What about S3, 8 vCPU / 18 GB?
Read the answer and reason

Answer: Not listed because it misses the 4 GB increments · The sequence is 16, 20, 24 and so on; 18 is not included.

How should you assess S4, 32 vCPU / 60 GB?
Read the answer and reason

Answer: Currently listed; verify Linux platform and other launch conditions · 60×1024 is 61440 MiB; table membership is distinct from success.

What does S5’s total of 3 vCPU and 24576 MiB represent?
Read the answer and reason

Answer: The sum of configured resources for three tasks, not measured performance · It is 1 vCPU×3 and 8192 MiB×3.

Check, then explain in your own words

  1. Convert the units in S1 and S4.
  2. Explain S2’s minimum and S3’s increments using the table.
  3. Identify measurements for your application and separate task size from task count.
Check your understanding: What remains after a Fargate size matches the table?

Platform applicability, actual launch conditions, application performance/health and cost review.

Accepted configuration, available resources and successful application behavior require separate evidence.

Sources and conditions checked

The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.