5

I am using a fresh Amazon EC2 t2.micro AMI. I installed sails.js in the server.

sudo npm install sails -g

I ran sails new app-name to create a new sails.js app. It takes 5 seconds in my local machine to create a new app. In the server it takes more than 2 minutes to perform the same.

I am using sails v0.11.2 and node v4.2.4 on my local machine and the server.

Am I missing something here?

1
  • see @dsmsk80's answer. What is your credit balance when it takes 2 minutes to do that? Also, what's your local hardware that is so fast? (ssd, many fast CPUs, etc) Jan 21, 2016 at 5:55

2 Answers 2

11

That instance size is among the least well-provisioned in the EC2 fleet. It is expected that it will not perform as well as your local machine.

2
  • I have initialized 12 EC2 t2.micro AMI servers and deployed sails before and none had any issues till now. Jan 14, 2016 at 14:06
  • 3
    Well, then you're falling victim to the "noisy neighbor" problem. Creating a new instance may mitigate this, but the fact remains, you cannot guarantee performance with this instance type. Performance reliability will generally go up as the instance size gets larger.
    – EEAA
    Jan 14, 2016 at 14:09
10

T2 instances have some baseline performance and ability to burst above it. Baseline performance depends on T2 instance size (10% for t2.micro, 20% for t2.small etc.).

What "burstable" mean? T2 instance gets some initial number of CPU credits and then it earns a specific number of CPU credits per an hour (time granularity is in mili-seconds). When CPU usage is below baseline performance T2 instance credit balance is growing (for 24 hours). When it requires to go over baseline performance it simply burst over it and spend a specific number of credits. It can burst up to 100% CPU performance. When all credits are spent T2 instance will run at baseline performance.

There are two new CloudWatch metrics to monitor T2 instances credits usage and balance:

  • CPUCreditUsage
  • CPUCreditBalance

These metrics will help you to find a suitable T2 instance for your application workload. Below, you can see a graph of both metrics and how they may change in time.

enter image description here.

For more details please check T2 instances official documentation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .