Amazon EC2 t2.micro AMI taking time to execute commands

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?


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.


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.