Skip to content

Commit d365f81

Browse files
authored
Merge pull request #119 from cybozu-go/add-16G
add config for 16G server
2 parents 5590410 + 71d2f10 commit d365f81

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

lib/vendor.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ const (
4343
Other Product = iota
4444
R6525
4545
R7525
46+
R6615
47+
R7615
4648
)
4749

4850
// DetectProduct detects product name.
@@ -57,6 +59,10 @@ func DetectProduct() (Product, error) {
5759
return R6525, nil
5860
case strings.Contains(product, "R7525"):
5961
return R7525, nil
62+
case strings.Contains(product, "R6615"):
63+
return R6615, nil
64+
case strings.Contains(product, "R7615"):
65+
return R7615, nil
6066
default:
6167
return Other, nil
6268
}

pkg/setup-hw/dell.go

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,21 @@ func (dc *dellConfigurator) configBIOS(ctx context.Context) error {
325325
}
326326

327327
func (dc *dellConfigurator) configPerformance(ctx context.Context) error {
328-
return dc.enqueueConfig(ctx, "BIOS.SysProfileSettings.SysProfile", "PerfPerWattOptimizedOs")
328+
product, err := lib.DetectProduct()
329+
if err != nil {
330+
return err
331+
}
332+
switch product {
333+
case lib.R6525, lib.R7525, lib.R7615:
334+
return dc.enqueueConfig(ctx, "BIOS.SysProfileSettings.SysProfile", "PerfPerWattOptimizedOs")
335+
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.
336+
return dc.enqueueConfig(ctx, "BIOS.SysProfileSettings.SysProfile", "PerfOptimized")
337+
default:
338+
log.Warn("unsupported product, skipping setting of SysProfile", map[string]interface{}{
339+
"product": product,
340+
})
341+
return nil
342+
}
329343
}
330344

331345
func (dc *dellConfigurator) configProcessor(ctx context.Context) error {
@@ -384,6 +398,8 @@ func (dc *dellConfigurator) configProcessor(ctx context.Context) error {
384398
npsVal = "1"
385399
}
386400
return dc.enqueueConfig(ctx, "BIOS.ProcSettings.NumaNodesPerSocket", npsVal)
401+
case lib.R6615, lib.R7615:
402+
return dc.enqueueConfig(ctx, "BIOS.ProcSettings.NumaNodesPerSocket", "1")
387403
default:
388404
return nil
389405
}

0 commit comments

Comments
 (0)