Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
88346: roachtest: use n1-standard for 16-core GCE machines r=srosenberg a=erikgrinaker

Roachtest used `n1-highcpu` machines at 16 cores and beyond. However, this causes a memory cliff, because a `n1-standard-8` machine has ~30 GB memory (3.75 GB per core), but a `n1-highcpu-16` machine only has 14 GB memory (0.9 GB per core).

This patch makes 16-core machines use `n1-standard` as well, with 60 GB memory, and only switches to `n1-highcpu` at 32 cores (with 29 GB memory).

Touches cockroachdb#87809.

Release note: None

Co-authored-by: Erik Grinaker <[email protected]>
  • Loading branch information
craig[bot] and erikgrinaker committed Sep 22, 2022
2 parents 5dc6853 + c7f231b commit bcd9d69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cmd/roachtest/spec/machine_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ func AWSMachineType(cpus int) string {

// GCEMachineType selects a machine type given the desired number of CPUs.
func GCEMachineType(cpus int) string {
// TODO(peter): This is awkward: below 16 cpus, use n1-standard so that the
// machines have a decent amount of RAM. We could use customer machine
// TODO(peter): This is awkward: at or below 16 cpus, use n1-standard so that
// the machines have a decent amount of RAM. We could use custom machine
// configurations, but the rules for the amount of RAM per CPU need to be
// determined (you can't request any arbitrary amount of RAM).
if cpus < 16 {
if cpus <= 16 {
return fmt.Sprintf("n1-standard-%d", cpus)
}
return fmt.Sprintf("n1-highcpu-%d", cpus)
Expand Down

0 comments on commit bcd9d69

Please sign in to comment.