Skip to content

Commit

Permalink
HPCC-31726 Optimize MALLOC_ARENA_MAX for containerized systems
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday committed Jul 24, 2024
1 parent 52757b0 commit b4bf1dd
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions helm/hpcc/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,7 @@ Pass in dict with root, me and dali if container in dali pod
{{- include "hpcc.addResources" (dict "me" .me.resources "root" .root) | indent 2 }}
{{- include "hpcc.addSecurityContext" . | indent 2 }}
env:
{{ include "hpcc.mergeEnvironments" $env | indent 2 -}}
{{ include "hpcc.mergeEnvironments" (dict "env" $env) | indent 2 -}}
- name: "SENTINEL"
value: "/tmp/{{ $serviceName }}.sentinel"
{{- with (dict "name" $serviceName) }}
Expand Down Expand Up @@ -2507,8 +2507,8 @@ global.noResourceValidation flag. This behavior can be overridden by the caller
A template to output a merged environment. Pass in a list with global then local environments. Only the last specified value for each named environment variable will be output
*/}}
{{- define "hpcc.mergeEnvironments" -}}
{{- $result := dict "MALLOC_ARENA_MAX" 8 -}}{{- /* HPCC arena default, can be overriden by component config */ -}}
{{- range . -}}
{{- $result := dict "MALLOC_ARENA_MAX" 8 -}}{{- /* HPCC arena default, can be overridden by component config */ -}}
{{- range .env -}}
{{- $_ := set $result .name .value -}}
{{- end -}}
{{- range $key,$value := $result -}}
Expand Down
2 changes: 1 addition & 1 deletion helm/hpcc/templates/dafilesrv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ spec:
{{ include "hpcc.configArg" . }}
]
env:
{{ include "hpcc.mergeEnvironments" $env | indent 8 -}}
{{ include "hpcc.mergeEnvironments" (dict "env" $env) | indent 8 -}}
- name: "SENTINEL"
value: "/tmp/{{ .name }}.sentinel"
{{ include "hpcc.addSentinelProbes" . | indent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion helm/hpcc/templates/dali.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ spec:
{{ include "hpcc.configArg" $dali }}
]
env:
{{ include "hpcc.mergeEnvironments" $env | indent 8 -}}
{{ include "hpcc.mergeEnvironments" (dict "env" $env) | indent 8 -}}
- name: "SENTINEL"
value: "/tmp/{{ $dali.name }}.sentinel"
{{ include "hpcc.addSentinelProbes" $dali | indent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion helm/hpcc/templates/dfuserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ spec:
{{ include "hpcc.daliArg" (dict "root" $ "component" "DFU Server" "optional" false) }}
]
env:
{{ include "hpcc.mergeEnvironments" $env | indent 8 -}}
{{ include "hpcc.mergeEnvironments" (dict "env" $env) | indent 8 -}}
- name: "SENTINEL"
value: "/tmp/{{ .name }}.sentinel"
{{ include "hpcc.addSentinelProbes" . | indent 8 }}
Expand Down
4 changes: 2 additions & 2 deletions helm/hpcc/templates/eclagent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ data:
{{- $appCmd := printf "%s %s %s _HPCC_ARGS_" $apptype (include "hpcc.configArg" .me) (include "hpcc.daliArg" (dict "root" .root "component" "ECL Agent" "optional" false )) }}
{{ include "hpcc.addCommandAndLifecycle" (. | merge (dict "command" $appCmd)) | indent 12 }}
env:
{{ include "hpcc.mergeEnvironments" .env | indent 12 }}
{{ include "hpcc.mergeEnvironments" (dict "env" .env) | indent 12 }}
workingDir: /var/lib/HPCCSystems
volumeMounts:
{{ include "hpcc.addConfigMapVolumeMount" .me | indent 12 }}
Expand Down Expand Up @@ -161,7 +161,7 @@ spec:
{{ include "hpcc.daliArg" (dict "root" $ "component" "ECL Agent" "optional" false) }}
]
env:
{{ include "hpcc.mergeEnvironments" $env | indent 8 -}}
{{ include "hpcc.mergeEnvironments" (dict "env" $env) | indent 8 -}}
- name: "SENTINEL"
value: "/tmp/{{ .name }}.sentinel"
{{ include "hpcc.addSentinelProbes" . | indent 8 }}
Expand Down
4 changes: 2 additions & 2 deletions helm/hpcc/templates/eclccserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ data:
{{- $eclccserverCmd := printf "eclccserver %s %s _HPCC_ARGS_" (include "hpcc.configArg" .me) (include "hpcc.daliArg" (dict "root" .root "component" "ECLCC Server" "optional" false)) }}
{{ include "hpcc.addCommandAndLifecycle" (. | merge (dict "command" $eclccserverCmd)) | indent 12 }}
env:
{{ include "hpcc.mergeEnvironments" .env | indent 12 }}
{{ include "hpcc.mergeEnvironments" (dict "env" .env) | indent 12 }}
workingDir: /tmp
volumeMounts:
{{ include "hpcc.addConfigMapVolumeMount" .me | indent 12 }}
Expand Down Expand Up @@ -171,7 +171,7 @@ spec:
{{ include "hpcc.daliArg" (dict "root" $ "component" "ECLCC Server" "optional" false) }}
]
env:
{{ include "hpcc.mergeEnvironments" $env | indent 8 -}}
{{ include "hpcc.mergeEnvironments" (dict "env" $env) | indent 8 -}}
- name: "SENTINEL"
value: "/tmp/{{ .name }}.sentinel"
{{ include "hpcc.addSentinelProbes" . | indent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion helm/hpcc/templates/eclscheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ spec:
{{ include "hpcc.daliArg" (dict "root" $ "component" "ECL Scheduler" "optional" false) }}
]
env:
{{ include "hpcc.mergeEnvironments" $env | indent 8 -}}
{{ include "hpcc.mergeEnvironments" (dict "env" $env) | indent 8 -}}
- name: "SENTINEL"
value: "/tmp/{{ .name }}.sentinel"
{{ include "hpcc.addSentinelProbes" . | indent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion helm/hpcc/templates/esp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ spec:
{{ include "hpcc.daliArg" (dict "root" $ "component" $application "optional" (has $application (list "esdl" "ldapenvironment" "loggingservice")) )}}
]
env:
{{ include "hpcc.mergeEnvironments" $env | indent 8 -}}
{{ include "hpcc.mergeEnvironments" (dict "env" $env) | indent 8 -}}
- name: "SENTINEL"
value: "/tmp/{{ .name }}.sentinel"
{{ include "hpcc.addSentinelProbes" . | indent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion helm/hpcc/templates/localroxie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
"--resolveLocally=false"
]
env:
{{ include "hpcc.mergeEnvironments" $env | indent 8 -}}
{{ include "hpcc.mergeEnvironments" (dict "env" $env) | indent 8 -}}
- name: "SENTINEL"
value: "/tmp/{{ $roxie.name }}.sentinel"
{{- $local := dict "first" true }}
Expand Down
6 changes: 3 additions & 3 deletions helm/hpcc/templates/roxie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ spec:
{{ include "hpcc.configArg" $toposerver }}
]
env:
{{ include "hpcc.mergeEnvironments" $env | indent 8 -}}
{{ include "hpcc.mergeEnvironments" (dict "env" $env) | indent 8 -}}
- name: "SENTINEL"
value: "/tmp/{{ $commonCtx.toponame }}.sentinel"
volumeMounts:
Expand Down Expand Up @@ -277,7 +277,7 @@ spec:
"--server=true"
]
env:
{{ include "hpcc.mergeEnvironments" $env | indent 8 -}}
{{ include "hpcc.mergeEnvironments" (dict "env" $env) | indent 8 -}}
- name: "SENTINEL"
value: "/tmp/{{ $roxie.name }}.sentinel"
{{- $local := dict "first" true }}
Expand Down Expand Up @@ -383,7 +383,7 @@ spec:
"--server={{ not $roxie.serverReplicas }}",
]
env:
{{ include "hpcc.mergeEnvironments" $env | indent 8 -}}
{{ include "hpcc.mergeEnvironments" (dict "env" $env) | indent 8 -}}
- name: "SENTINEL"
value: "/tmp/{{ $roxie.name }}.sentinel"
{{- if not $roxie.serverReplicas }}
Expand Down
8 changes: 4 additions & 4 deletions helm/hpcc/templates/thor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ data:
{{- $agentCmd := printf "%s %s %s _HPCC_ARGS_" $eclAgentType (include "hpcc.configArg" .me) (include "hpcc.daliArg" (dict "root" .root "component" "Thor" "optional" false)) }}
{{ include "hpcc.addCommandAndLifecycle" (. | merge (dict "command" $agentCmd)) | indent 12 }}
env:
{{ include "hpcc.mergeEnvironments" .env | indent 12 }}
{{ include "hpcc.mergeEnvironments" (dict "env" .env) | indent 12 }}
workingDir: /var/lib/HPCCSystems
volumeMounts:
{{ include "hpcc.addConfigMapVolumeMount" .me | indent 12 }}
Expand Down Expand Up @@ -182,7 +182,7 @@ data:
{{- $thorManagerCmd := printf "thormaster_lcr %s %s _HPCC_ARGS_" (include "hpcc.configArg" .me) (include "hpcc.daliArg" (dict "root" .root "component" "Thor" "optional" false)) }}
{{ include "hpcc.addCommandAndLifecycle" (. | merge (dict "command" $thorManagerCmd)) | indent 12 }}
env:
{{ include "hpcc.mergeEnvironments" .env | indent 12 }}
{{ include "hpcc.mergeEnvironments" (dict "env" .env) | indent 12 }}
workingDir: /var/lib/HPCCSystems
volumeMounts:
{{ include "hpcc.addConfigMapVolumeMount" .me | indent 12 }}
Expand Down Expand Up @@ -379,7 +379,7 @@ spec:
{{ printf "\"--name=%s\"" .name }}
]
env:
{{ include "hpcc.mergeEnvironments" $env | indent 8 -}}
{{ include "hpcc.mergeEnvironments" (dict "env" $env) | indent 8 -}}
- name: "SENTINEL"
value: "/tmp/{{ $commonCtx.eclAgentName }}.sentinel"
{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }}
Expand Down Expand Up @@ -442,7 +442,7 @@ spec:
{{ printf "\"--name=%s\"" .name }}
]
env:
{{ include "hpcc.mergeEnvironments" $env | indent 8 -}}
{{ include "hpcc.mergeEnvironments" (dict "env" $env) | indent 8 -}}
- name: "SENTINEL"
value: "/tmp/{{ $commonCtx.thorAgentName }}.sentinel"
{{- include "hpcc.addSecurityContext" $commonCtx | indent 8 }}
Expand Down

0 comments on commit b4bf1dd

Please sign in to comment.