I am running a .NET 6 container in ECS Fargate. My task definition defines the task size:
Task Memory: 1024
Task CPU: 512
The task has 2 containers running - the service and the envoy proxy. The containers define the following:
.NET Service
CPU Units: 0
Hard/Soft memory limits: --/--
Envoy
CPU Units: 0
Hard/Soft memory limits: 500/--
The the ECS Portal, the service shows the CPUUtilization metric in the following graph:
This graph seems to indicate that CPU utilization is quite low.
I have a CloudWatch alarm configured for when the Average CpuUtilized of the service goes over 90%, however it seems to alarm despite the other metrics indicating very low utilization.
Container Insights also shows low utilization.
I suspect it could be due to not specifying the CPU Units
for the task containers. How can I ensure the metric used for the CloudWatch is consistent with other insights and metrics?
Edit
Even when specifying the CPU Units
for each container in the task, I have the same inconsistency.