Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
    
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) – tedder42 Jan 21 at 5:55
up vote 11 down vote accepted

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.

share|improve this answer
    
I have initialized 12 EC2 t2.micro AMI servers and deployed sails before and none had any issues till now. – Jaseem Abbas Jan 14 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 at 14:09

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.