AWS - EC2

 

 

 


Instance

 

AMI PV vs HVM

  • PV: Paravirtual
  • HVM: Hardware Virtual Machine

PV

Paravirtual guests can run on host hardware that does not have explicit support for virtualization.
(Intel Virtualization Technology)

Boot

PV AMIs boot with a special boot loader called PV-GRUB,

  which starts the boot cycle and then chain loads the kernel specified in the menu.lst file on your image.

HVM boot by executing the master boot record of the root block device of your image.

Performance

PV guests had better performance than HVM guests in many cases,

  but because of enhancements in HVM virtualization and

  the availability of PV drivers for HVM AMIs, this is no longer true.

 


Centos AWS Instance

 

https://wiki.centos.org/Cloud/AWS

 


Instances 's Credit specification

 

Instance can sustain high CPU utilization for any period of time whenever required.

Setting

T3 instances launch as unlimited by default.

It can be enabled or disabled at any time for a running or stopped instance.

Credits

If the average CPU usage over a 24-hour period exceeds the baseline, you incur charges for surplus credits.

When its CPU utilization falls below the baseline,

it uses the CPU credits that it earns to pay down the surplus credits that it spent earlier.

The hourly instance price automatically covers all CPU usage spikes

  if the average CPU utilization of the instance is at or below the baseline over a rolling 24-hour period or

  the instance lifetime, whichever is shorter.

1 CPU credit 相當於

  • One vCPU at 100% utilization for one minute
  • One vCPU at 50% utilization for two minutes
  • Two vCPUs at 25% utilization for two minutes

Earning CPU credits

t3.nano

CPU credits earned per hour: 6
Maximum earned credits that can be accrued: 144
vCPUs: 2
Baseline utilization per vCPU: 5%

t3.micro     

CPU credits earned per hour: 12
Maximum earned credits that can be accrued: 288
vCPUs: 2
Baseline utilization per vCPU: 10%

Maximum earned credits that can be accrued:

相當於 24hr 內可以賺到幾多 credits

For T3 and T4g, the CPU credit balance persists for 7 days after an instance stops and the credits are lost thereafter.

Baseline utilization:

它是 Per vCPU

(number of credits earned/number of vCPUs)/60 minutes = %

i.e. t3.nano

6 / 2 / 60 = 5%

Credits Usage

Spent surplus credits are tracked by the CloudWatch metric CPUSurplusCreditBalance

CPUCreditUsage

CPUCreditBalance

T2/T3 Unlimited Mode Pricing

For T2 and T3 instances in Unlimited mode, CPU Credits are charged at per vCPU-hour

  • $0.05 per vCPU-Hour for Linux, RHEL and SLES
  • $0.096 per vCPU-Hour for Windows and Windows with SQL Web

When to use unlimited mode versus fixed CPU (breakeven CPU usage)

If a T3 instance continuously bursts at 100% CPU,

you end up paying approximately 1.5 times the price of an equivalently-sized M5 instance.

T3 instance 累計幾多 % CPU 後應選用 M5 instance

t3.large     42.5%
t3.xlarge     52.5%
t3.2xlarge     52.5%

 

 


ECUs