sharath.g
sharath.g

Reputation: 311

ASP.NET application slow performance on AWS EC2 t2.micro

I'm new to AWS and trying to run an ASP.NET MVC and Web API web application hosted on IIS in a t2.micro EC2 instance. The database is an RDS instance of MS SQL server express 2016.

The website was running normally from yesterday night until today afternoon, then it became incredibly slow and un-usable, and now it's running perfectly alright again. Based on the application logs it seemed that the database calls were taking a long time, but I'm confused as to what's causing it and what to check to diagnose the problem.

  1. Is it the CPU credits? I had 86 when it was running terribly slow and now I have 126 CPU credits when it's running fine.
  2. Does the RDS also maintain CPU credits? Do I need to check something here?
  3. Is 86 CPU credits very low to run an ASP.NET MVC and Web API application?

Some more info: 1. The max cpu utilization in the last 24 hours was at 12.9% and then 13.8% for about 1-2 minutes, otherwise it's been below 1%

Thanks in advance!

Upvotes: 3

Views: 1639

Answers (1)

Andrey Larin
Andrey Larin

Reputation: 94

At first, starting an application is always CPU bound process. In order to understand how ec2 works you may need to do the following:

  1. T2.micro has 30 CPU credits available.
  2. You can look at CloudWatch metrics like (CPUCreditBalance and CPUCreditUsage) for your instance to see the detailed information about available CPU credits while the instance is running.
  3. Check for the available credits and match it against instance performance during the max CPU load periods.
  4. Finally you can enable T2 unlimited option and then check performance one more time

Hope that helps.

Upvotes: 2

Related Questions