Skip to content

Commit

Permalink
data/aws: Bump default instance type from t2.medium to t3.medium
Browse files Browse the repository at this point in the history
The T3 instances were launched in 2018-08-21 [1].  The documents stats
are fairly similar to the T2 analogs [2,3]:

  Name                                      t2.medium  t3.medium
  vCPUs                                     2          2
  Memory (GiB)                              4.0        4.0
  Baseline Performance/vCPU                            20%
  CPU Credits earned/hr                     24         24
  Network burst bandwidth (Gbps)                       5
  EBS burst bandwidth (Gbps)                           1.50
  On-Demand Price/hr*                       $0.0464    $0.0418
  1-yr Reserved Instance Effective Hourly*             $0.025
  3-yr Reserved Instance Effective Hourly*             $0.017

  * Prices shown are for Linux/Unix in US East (Northern Virginia) AWS
    Region. Prices for 1-year and 3-year reserved instances are for
    "Partial Upfront" payment options or "No upfront" for instances
    without the Partial Upfront option. For full pricing details, see
    the Amazon EC2 pricing page [4].

The only obvious difference there is that the T3 instances are 10%
cheaper.  However, from [1]:

  If the instance runs at higher CPU utilization for a prolonged
  period, there will be an additional charge of $0.05 per vCPU-hour.

and from [2]:

  T3 instances start in Unlimited mode by default... If the instance
  needs to run at higher CPU utilization for a prolonged period, it
  can do so for an additional charge of $0.05 per vCPU-hour.  In
  Standard mode, a T3 instance can burst until it uses up all its
  earned credits.

The difference vs. T2 seems to be that with T2, Unlimited mode was
opt-in while with T3 it is opt-out.  You can set a credit
specification in Terraform [5] to opt out, but there doesn't seem to
be a setting in the cluster-API structures for this.  And in any case,
we expect:

* Most users to be able to run clusters of up to ~15 workers without
  overextending an Unlimited t3.medium.

* To have cluster alerts for when nodes have exhausted their CPU
  quota, which will tell cluster admins that it's time to rotate in
  some larger master nodes.  We may already have this alerting, but
  I'm not sure where it lives.

* To have CI be able to get through its e2e tests before exhausting
  the initial CPU credits.  But we can monitor this with the
  above-mentioned alerting as well.

The FIXME is because pkg/tfvars is consuming the install-config, so it
doesn't know about configuration that landed further downstream in the
asset graph's pkg/asset/machines.  I have a partial fix for that, but
Abhinav wanted to punt that to future work [6].

[1]: https://aws.amazon.com/blogs/aws/new-t3-instances-burstable-cost-effective-performance/
[2]: https://aws.amazon.com/ec2/instance-types/t2/
[3]: https://aws.amazon.com/ec2/instance-types/t3/
[4]: https://aws.amazon.com/ec2/pricing/
[5]: https://www.terraform.io/docs/providers/aws/r/instance.html#credit-specification
[6]: #724 (comment)
  • Loading branch information
wking committed Nov 30, 2018
1 parent 6ccf0f1 commit 8ed4d9f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion data/data/aws/bootstrap/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ variable "ignition" {

variable "instance_type" {
type = "string"
default = "t2.medium"
default = "t3.medium"
description = "The EC2 instance type for the bootstrap node."
}

Expand Down
6 changes: 4 additions & 2 deletions data/data/aws/variables-aws.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ EOF

variable "tectonic_aws_master_ec2_type" {
type = "string"
description = "Instance size for the master node(s). Example: `t2.medium`."
default = "t2.medium"
description = "Instance size for the master node(s). Example: `t3.medium`."

# FIXME: get this wired up to the machine default
default = "t3.medium"
}

variable "tectonic_aws_ec2_ami_override" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/asset/machines/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

func defaultAWSMachinePoolPlatform() awstypes.MachinePool {
return awstypes.MachinePool{
InstanceType: "t2.medium",
InstanceType: "t3.medium",
}
}

Expand Down

0 comments on commit 8ed4d9f

Please sign in to comment.