Skip to content

Commit

Permalink
update flag name
Browse files Browse the repository at this point in the history
  • Loading branch information
Pritham Marupaka committed Nov 13, 2023
1 parent 694c0c5 commit b5311e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ configVersion: 1
jvmOpts:
- '-Xmx1g'
experimental:
useProcessorAwareInitialHeapPercentage: true
useProcessorAwareInitialHeapSize: true

This comment has been minimized.

Copy link
@carterkozak

carterkozak Nov 13, 2023

Contributor

Perhaps something along the lines of experimentalContainerV2?

2 changes: 1 addition & 1 deletion launchlib/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type CustomLauncherConfig struct {

type ExperimentalLauncherConfig struct {
// Also disables setting the active processor count JVM argument.
UseProcessorAwareInitialHeapPercentage bool `yaml:"useProcessorAwareInitialHeapPercentage"`
UseProcessorAwareInitialHeapSize bool `yaml:"useProcessorAwareInitialHeapSize"`
}

type PrimaryCustomLauncherConfig struct {
Expand Down
6 changes: 3 additions & 3 deletions launchlib/launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func ensureActiveProcessorCount(customConfig *CustomLauncherConfig, args []strin
filtered = append(filtered, arg)
}

if !hasActiveProcessorCount && !customConfig.Experimental.UseProcessorAwareInitialHeapPercentage {
if !hasActiveProcessorCount && !customConfig.Experimental.UseProcessorAwareInitialHeapSize {
processorCountArg, err := getActiveProcessorCountArg(logger)
if err == nil {
filtered = append(filtered, processorCountArg)
Expand Down Expand Up @@ -382,10 +382,10 @@ func isInitialRAMPercentage(arg string) bool {
return strings.HasPrefix(arg, "-XX:InitialRAMPercentage=")
}

// If the experimental `UseProcessorAwareInitialHeapPercentage` is enabled, compute the heap percentage as 75% of the
// If the experimental `UseProcessorAwareInitialHeapSize` is set, compute the heap percentage as 75% of the
// heap minus 3mb per processor, with a minimum value of 50%.
func computeInitialHeapPercentage(customConfig *CustomLauncherConfig) (float64, error) {
if !customConfig.Experimental.UseProcessorAwareInitialHeapPercentage {
if !customConfig.Experimental.UseProcessorAwareInitialHeapSize {
return 75.0, nil
}

Expand Down

0 comments on commit b5311e2

Please sign in to comment.