Skip to content

Commit

Permalink
add config for 16G server
Browse files Browse the repository at this point in the history
  • Loading branch information
YZ775 committed Dec 4, 2024
1 parent 5590410 commit 7d2e70a
Show file tree
Hide file tree
Showing 2 changed files with 20 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
15 changes: 14 additions & 1 deletion pkg/setup-hw/dell.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,18 @@ 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:
return dc.enqueueConfig(ctx, "BIOS.SysProfileSettings.SysProfile", "PerfPerWattOptimizedOs")
case lib.R6615, lib.R7615:
return dc.enqueueConfig(ctx, "BIOS.SysProfileSettings.SysProfile", "PerfOptimized")
default:
return fmt.Errorf("unsupported product: %v", product)
}
}

func (dc *dellConfigurator) configProcessor(ctx context.Context) error {
Expand Down Expand Up @@ -384,6 +395,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 7d2e70a

Please sign in to comment.