EC2 stop responding after CPU Credit Balance is 0

0

I am new to AWS and still trying to figure out how EC2 CPU Credit works.

Currently I am running an EC2 instance with type of t2.micro . However, every week there will be a day that this instance running at 50% CPU for about 6 hours, and from the monitoring dashboard I can tell the CPU credit balance burns down to 0 then the instance will enter Instance reachability check failed state. Eventually, the EC2 just stop responding

What will be the configuration for me to prevent EC2 instance stop? or does anyone know which cheap instance type I should switch to?

Jason S
질문됨 일 년 전651회 조회
1개 답변
0

Hello Jason,

This is an expected behavior. Please use the following workflow to determine the best resolution.

  1. What is the maximum CPU utilization the instance is hitting? By default, the Cloudwatch metrics show Average utilization over 5 minute interval. Set this to Maximum over 5 minute interval. You will get a better picture of your CPU utilization.
  2. SSH into the instance and set up atop/sar if you havent already done so. These utilities store historical data, so the next time your system goes down, ssh into the system and use the command $ atopsar -A -b <start time> -e <end time> to view which process is actually over utilizing the CPU.
  3. If you cannot further refactor the process to use less CPU, the best thing would be to resize your instance to a higher size or turn on unlimited burst credits

NOTE: Both of these options will result in increased costs.

Since you are new to AWS, I would also recommend going through the following documentation to gain better understanding:
[+] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-credits-baseline-concepts.html [+] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-unlimited-mode-concepts.html

Hope this helps.

profile pictureAWS
지원 엔지니어
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠