Skip to content

Commit

Permalink
Switch to using pd-balanced for all user & dask nodes
Browse files Browse the repository at this point in the history
We were using standard disk to save costs, but that brings with
it much slower node startup time, as images being pulled take time.
pd-balanced is a newer alternative to pure SSD disks that is
not as expensive, but provides much better performance than pd-standard.

I think the extra cost is worth the performance on all these
cases.
  • Loading branch information
yuvipanda committed Mar 16, 2022
1 parent d9c4932 commit 33a0fd2
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 32 deletions.
17 changes: 13 additions & 4 deletions terraform/gcp/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,13 @@ resource "google_container_node_pool" "notebook" {


node_config {

# Balanced disks are much faster than standard disks, and much cheaper
# than SSD disks. It contributes heavily to how fast new nodes spin up,
# as images being pulled takes up a lot of new node spin up time.
# Faster disks provide faster image pulls!
disk_type = "pd-balanced"

workload_metadata_config {
# Config Connector requires workload identity to be enabled (via GKE_METADATA_SERVER).
# If config connector is not necessary, we use simple metadata concealment
Expand Down Expand Up @@ -257,10 +264,12 @@ resource "google_container_node_pool" "dask_worker" {
node_config {

preemptible = true
# SSD Disks for dask workers make image pulls much faster
# Since we might have many dask workers spinning up at the
# same time, the extra cost of using this is probably worth it.
disk_type = "pd-ssd"

# Balanced disks are much faster than standard disks, and much cheaper
# than SSD disks. It contributes heavily to how fast new nodes spin up,
# as images being pulled takes up a lot of new node spin up time.
# Faster disks provide faster image pulls!
disk_type = "pd-balanced"

workload_metadata_config {
# Config Connector requires workload identity to be enabled (via GKE_METADATA_SERVER).
Expand Down
4 changes: 2 additions & 2 deletions terraform/gcp/projects/cloudbank.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ notebook_nodes = {
min : 0,
max : 20,
machine_type : "n1-highmem-4",
labels: {}
labels: {},
},
}

Expand All @@ -24,7 +24,7 @@ dask_nodes = {
min : 0,
max : 100,
machine_type : "n1-highmem-4",
labels: {}
labels: {},
},
}

Expand Down
24 changes: 14 additions & 10 deletions terraform/gcp/projects/meom-ige.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,31 @@ notebook_nodes = {
min : 0,
max : 20,
machine_type : "n1-standard-2",
labels: {}
labels: {},
},
"medium" : {
min : 0,
max : 20,
machine_type : "n1-standard-8",
labels: {}
labels: {},
},
"large" : {
min : 0,
max : 20,
machine_type : "n1-standard-16",
labels: {}
labels: {},
},
"very-large" : {
min : 0,
max : 20,
machine_type : "n1-standard-32",
labels: {}
labels: {},
},
"huge" : {
min : 0,
max : 20,
machine_type : "n1-standard-64",
labels: {}
labels: {},
},

}
Expand All @@ -58,31 +58,35 @@ dask_nodes = {
min : 0,
max : 20,
machine_type : "n1-standard-2",
labels: {}
labels: {},
},
"medium" : {
min : 0,
max : 20,
machine_type : "n1-standard-8",
labels: {}
labels: {},
disk_type: "pd-ssd"
},
"large" : {
min : 0,
max : 20,
machine_type : "n1-standard-16",
labels: {}
labels: {},
disk_type: "pd-ssd"
},
"very-large" : {
min : 0,
max : 20,
machine_type : "n1-standard-32",
labels: {}
labels: {},
disk_type: "pd-ssd"
},
"huge" : {
min : 0,
max : 20,
machine_type : "n1-standard-64",
labels: {}
labels: {},
disk_type: "pd-ssd"
},

}
Expand Down
12 changes: 6 additions & 6 deletions terraform/gcp/projects/pangeo-hubs.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ notebook_nodes = {
min : 0,
max : 100,
machine_type : "n1-standard-4",
labels: {}
labels: {},
},
"medium" : {
min : 0,
max : 100,
machine_type : "n1-standard-8",
labels: {}
labels: {},
},
"large" : {
min : 0,
max : 100,
machine_type : "n1-standard-16",
labels: {}
labels: {},
},
}

Expand All @@ -44,18 +44,18 @@ dask_nodes = {
min : 0,
max : 100,
machine_type : "n1-standard-4",
labels: {}
labels: {},
},
"medium" : {
min : 0,
max : 100,
machine_type : "n1-standard-8",
labels: {}
labels: {},
},
"large" : {
min : 0,
max : 100,
machine_type : "n1-standard-16",
labels: {}
labels: {},
},
}
4 changes: 2 additions & 2 deletions terraform/gcp/projects/pilot-hubs.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ notebook_nodes = {
min : 0,
max : 20,
machine_type : "n1-highmem-4",
labels: { }
}
labels: { },
},
}

dask_nodes = {
Expand Down
16 changes: 8 additions & 8 deletions terraform/gcp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ variable "enable_private_cluster" {
}

variable "enable_filestore" {
type = bool
default = false
type = bool
default = false
description = <<-EOT
Deploy a Google FileStore for home directories
Expand All @@ -201,8 +201,8 @@ variable "enable_filestore" {
}

variable "filestore_capacity_gb" {
type = number
default = 1024
type = number
default = 1024
description = <<-EOT
Minimum size (in GB) of Google FileStore.
Expand All @@ -211,8 +211,8 @@ variable "filestore_capacity_gb" {
}

variable "filestore_tier" {
type = string
default = "BASIC_HDD"
type = string
default = "BASIC_HDD"
description = <<-EOT
Google FileStore service tier to use.
Expand All @@ -222,8 +222,8 @@ variable "filestore_tier" {
}

variable "enable_node_autoprovisioning" {
type = bool
default = false
type = bool
default = false
description = <<-EOT
Enable auto-provisioning of nodes based on workload
EOT
Expand Down

0 comments on commit 33a0fd2

Please sign in to comment.