0

I am running a t3 small instance on AWS. Whenever its CPU usage reaches 80%, it becomes unresponsive, and we are unable to access it via SSH. After stopping and starting the instance, everything comes back online. Here are the things I have checked:

  1. I checked the logs, but there was nothing special in them. 2.The VM is already running in unlimited CPU mode, and we have more than enough credits.
  2. The CPU spike is due to running a Google campaign that we run every 15 days.

Any suggestion?

  • Please edit your question to describe the work load. What software versions, both the application and the OS distro? What volume of end user requests is typical, versus what does the spike look like? What do the rest of the host resource metrics look like? – John Mahowald Apr 11 '23 at 23:30

1 Answers1

1

T series instances have CPU credits and EBS burst balance. You're likely running out of one of them. Look at Cloudwatch Logs to see which resource you're exhausting - it's more likely CPU.

Your options are:

  • Enable T3 unlimited, so you pay for additional CPU cycles above those included in the base cost (easiest option and probably the cheapest as well)
  • Use a larger T3 instance so you have a larger burst balance available
  • Use a different instance type that doesn't do bursting
  • Autoscale so instances are added when your load increases (this is the most scalable option). Auto scaling works best with instances that have constant CPU available, or T3 unlimited enabled. If your traffic comes on suddenly you will want to use something like scheduled scaling
Tim
  • 31,888
  • 7
  • 52
  • 78