A t3.large app server became slow in the afternoon; `top` shows `st` (steal) at 35% and CloudWatch `CPUCreditBalance` is 0.

IntermediateTroubleshootingDisk, memory and CPU
Answer

Likely causes → Burstable instances earn CPU credits below a baseline (30% per vCPU for t3.large) and spend them above it. Once credits run out in standard mode, the instance is held to baseline, which shows up as steal time and a slow app.

Diagnose →

aws cloudwatch get-metric-statistics --namespace AWS/EC2 --metric-name CPUCreditBalance \
  --dimensions Name=InstanceId,Value=$ID --start-time $(date -u -d '-12 hours' +%FT%TZ) \
  --end-time $(date -u +%FT%TZ) --period 300 --statistics Minimum
aws ec2 describe-instance-credit-specifications --instance-ids $ID

Fix → Immediate: switch to unlimited mode (aws ec2 modify-instance-credit-specification --instance-credit-specifications InstanceId=$ID,CpuCredits=unlimited). If the workload is constantly above baseline, move to a fixed-performance family (m7i, c7g).

Prevent → Alert on CPUCreditBalance trending down, and don't use T-family instances for steady production load.

All Real-World Interview questions Roadmap: Interview readiness

More on Disk, memory and CPU