Skip to content

Commit

Permalink
Merge pull request #119 from cybozu-go/add-16G
Browse files Browse the repository at this point in the history
add config for 16G server
  • Loading branch information
YZ775 authored Dec 5, 2024
2 parents 5590410 + 71d2f10 commit d365f81
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
6 changes: 6 additions & 0 deletions lib/vendor.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ const (
Other Product = iota
R6525
R7525
R6615
R7615
)

// DetectProduct detects product name.
Expand All @@ -57,6 +59,10 @@ func DetectProduct() (Product, error) {
return R6525, nil
case strings.Contains(product, "R7525"):
return R7525, nil
case strings.Contains(product, "R6615"):
return R6615, nil
case strings.Contains(product, "R7615"):
return R7615, nil
default:
return Other, nil
}
Expand Down
18 changes: 17 additions & 1 deletion pkg/setup-hw/dell.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,21 @@ func (dc *dellConfigurator) configBIOS(ctx context.Context) error {
}

func (dc *dellConfigurator) configPerformance(ctx context.Context) error {
return dc.enqueueConfig(ctx, "BIOS.SysProfileSettings.SysProfile", "PerfPerWattOptimizedOs")
product, err := lib.DetectProduct()
if err != nil {
return err
}
switch product {
case lib.R6525, lib.R7525, lib.R7615:
return dc.enqueueConfig(ctx, "BIOS.SysProfileSettings.SysProfile", "PerfPerWattOptimizedOs")
case lib.R6615: // In 16G server, we cannot disable power saving function even if we set cpu-governor. We need set System Profile to Performance.
return dc.enqueueConfig(ctx, "BIOS.SysProfileSettings.SysProfile", "PerfOptimized")
default:
log.Warn("unsupported product, skipping setting of SysProfile", map[string]interface{}{
"product": product,
})
return nil
}
}

func (dc *dellConfigurator) configProcessor(ctx context.Context) error {
Expand Down Expand Up @@ -384,6 +398,8 @@ func (dc *dellConfigurator) configProcessor(ctx context.Context) error {
npsVal = "1"
}
return dc.enqueueConfig(ctx, "BIOS.ProcSettings.NumaNodesPerSocket", npsVal)
case lib.R6615, lib.R7615:
return dc.enqueueConfig(ctx, "BIOS.ProcSettings.NumaNodesPerSocket", "1")
default:
return nil
}
Expand Down

0 comments on commit d365f81

Please sign in to comment.