Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add block validator memory settings #91

Merged
merged 7 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/nitro/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ maintainers:

type: application

version: 0.6.20
version: 0.6.21

appVersion: "v3.2.1-d81324d"
2 changes: 2 additions & 0 deletions charts/nitro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ helm install xai offchainlabs/nitro -f values.yaml
| `env.nitro.goMemLimit.multiplier` | The multiplier of available memory to use for nitro | `0.9` |
| `env.resourceMgmtMemFreeLimit.enabled` | Enable nitro resource management | `false` |
| `env.resourceMgmtMemFreeLimit.multiplier` | The multiplier of available memory to use | `0.05` |
| `env.blockValidatorMemFreeLimit.enabled` | Enable block validator memory management | `false` |
| `env.blockValidatorMemFreeLimit.multiplier` | The multiplier of available memory to use | `0.05` |
| `persistence.enabled` | Enable persistence | `true` |
| `persistence.size` | Size of the persistent volume claim | `500Gi` |
| `persistence.storageClassName` | Storage class of the persistent volume claim | `nil` |
Expand Down
2 changes: 2 additions & 0 deletions charts/nitro/ci/sepolia-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ resources:
env:
resourceMgmtMemFreeLimit:
enabled: true
blockValidatorMemFreeLimit:
enabled: true

configmap:
data:
Expand Down
4 changes: 4 additions & 0 deletions charts/nitro/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ nitro args
- name: {{ $envPrefix }}_NODE_RESOURCE__MGMT_MEM__FREE__LIMIT
value: {{ printf "%dB" (int (mulf $valueMi ($.Values.env.resourceMgmtMemFreeLimit.multiplier | default 0.05) 1048576)) }}
{{- end }}
{{- if $.Values.env.blockValidatorMemFreeLimit.enabled }}
- name: {{ $envPrefix }}_NODE_BLOCK__VALIDATOR_MEMORY__FREE__LIMIT
value: {{ printf "%dB" (int (mulf $valueMi ($.Values.env.blockValidatorMemFreeLimit.multiplier | default 0.05) 1048576)) }}
{{- end }}
{{- end -}}
{{- end -}}

Expand Down
5 changes: 5 additions & 0 deletions charts/nitro/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ updateStrategy:
## @param env.nitro.goMemLimit.multiplier The multiplier of available memory to use for nitro
## @param env.resourceMgmtMemFreeLimit.enabled Enable nitro resource management
## @param env.resourceMgmtMemFreeLimit.multiplier The multiplier of available memory to use
## @param env.blockValidatorMemFreeLimit.enabled Enable block validator memory management
## @param env.blockValidatorMemFreeLimit.multiplier The multiplier of available memory to use
env:
splitvalidator:
goMemLimit:
Expand All @@ -61,6 +63,9 @@ env:
resourceMgmtMemFreeLimit:
enabled: false
multiplier: 0.05
blockValidatorMemFreeLimit:
enabled: false
multiplier: 0.05

## @param persistence.enabled Enable persistence
## @param persistence.size Size of the persistent volume claim
Expand Down