How To Choose High Performance AWS EC2 Instance Type For You To Run Faster

When I use the amazon AWS ec2 virtual machine, I always find the virtual machine runs too slow. I open the task manager and found that the CPU usage always reaches 100%, this is the root cause of the slow VM. But at last, I find the real reason is because of the AWS EC2 instance type. This article will tell you how to fix it.

1. How To Choose High-Performance AWS EC2 Instance Type For You To Run Faster.

  1. You can go to the link https://aws.amazon.com/ec2/instance-types/ to see all the AWS EC2 instance types.
  2. Among all the types, we should pay special attention to the T type (t2. t3. t3a. t4g .etc.).
  3. The T type AWS EC2 instance is also called burstable performance instances type.
  4. Their price may be cheap than other types, but their CPU usage is also limited.
  5. When you start to run the T-type EC2 VM, it begins to earn the credits for you, but you can just use a percentage of the CPU capacity, not the full CPU capacity.
  6. For example, for the t3.micro instance type, when you start it, you earn credit, but the credit can only give your 20% of the CPU capacity to use.
  7. When your VM server is idle at night,  that means the CPU usage is less than 20%, then your VM can earn credits over the night.
  8. When you wake up in the morning and start to use the VM, the CPU usage is more than 20%, then your VM starts to spend the credits to keep the CPU usage.
  9. When all the credits the VM has earned are used, then your VM CPU will run very slowly.
  10. But AWS provides you an option to buy more credits, you can configure this option on the AWS EC2 instance configuration page.
  11. Log in to the AWS management console and go to the instances list page, select the EC2 instance by checking the checkbox before the EC2 instance.
  12. Click the Actions drop-down list on the page top right area, then click Instance Settings —> Change credit specification menu item.
  13. Then it will open the Credit specification page, check the checkbox under the text Enable unlimited mode, and click the Save button to save it.
  14. Now your AWS EC2 instance can buy credits to use more percentage of the CPU usage when the credits are not enough.
  15. The credit buying fee for Linux is 0.05$/hour, and for Windows is 0.095$/hour.
  16. The AWS EC2 instance’s credit specification attribute has 2 values, they are standard mode & unlimited mode.
  17. The t2 type AWS EC2 instance default set the standard mode, and the t3, t3a type AWS EC2 instance default set the unlimited mode.
  18. In the standard mode, the VM can earn credits when in idle time ( CPU usage is lower than the baseline usage).
  19. In the unlimited mode, the VM can earn credits when in idle time ( CPU usage is lower than the baseline usage) and also can buy credits when needed.
  20. You can change the AWS EC2 instance credit specification mode at any time.

2. Conclusion.

2.1 When To Use AWS EC2 T Type Instance.

  1. If you use the AWS EC2 VM for a long time and most of the time the VM is idle, then you can choose the T type.
  2. When you do not use the VM, close all the applications on it to male lower CPU usage to earn credits.
  3. Then when you use it again, you can use more CPU percentage by the credits you have earned.
  4. If you use AWS EC2 T type instance in unlimited credit specification mode, it may not be cheap.
  5. Because the cost needs to add 0.05$/hour (Linux) and 0.095$/hour (Windows).
  6. This method should be used for AWS free tier in standard credit specification mode.
  7. Because the free tier is totally free and when you do not need to use the VM ( for example when you go to sleep at the night or when you go to exercise or have lunch ), you can close all the applications in the AWS EC2 VM and let it run in idle mode, then it can earn more credits for you.
  8. But if you find it runs slowly, you can change the EC2 instance credit specification attribute value to unlimited mode to make it run faster which may cost some money.
  9. When you do not need to use it, you can change the EC2 instance credit specification attribute value back to standard mode again to save money.
  10. In this way, you can make your work faster by using the full capacity of the CPU and cost less money.
  11. Another use case that can use the T type instance is that when you host a web server on it, and the webserver is not busy for the whole day, most of the day there is less traffic to your webserver. In such a case, if you choose the unlimited mode for the credit specification, it can also save some money while giving your web server enough CPU capacity.

2.2 When To Use Other AWS EC2 Instance Type.

  1. When you do not need to use the AWS EC2 VM for a long time such as using it for 5 hours every day.
  2. You had better use other instance types such as a type, c type .etc.
  3. Those types will give you full CPU capacity to use.

2.3 Where To Find Your EC2 Instance Credit Data & CPU Usage.

  1. AWS provides a dashboard for you to monitor your  EC2 instance data, including credit specification mode, CPU utilization (usage) (%), CPU credit usage (count), and CPU credit balance (count).
  2. Log in to your AWS management console, and click the Instances link on the page left side to go to the instances list page.
  3. Check the checkbox before an EC2 instance to select it.
  4. Click the Details tab below the EC2 instances list.
  5. You can search the keyword credit specification on the page, then you can find the credit specification mode.
  6. Click the Monitoring tab, it will list a lot of charts on the page, the chart includes CPU utilization (usage) (%), CPU credit usage (count), and CPU credit balance (count).

3. References.

  1. UNDERSTANDING T2 AND T3 CPU CREDITS IN AWS.
  2. Key concepts and definitions for burstable performance instances.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Clicky