From 32eeeec29ef1fdc2e8a9840298f8b1eec5f7e40c Mon Sep 17 00:00:00 2001 From: Vladyslav Deryhin Date: Mon, 3 Jun 2024 19:31:28 +0300 Subject: [PATCH 1/3] add solana ulimit --- dysnix/solana/README.md | 14 ++++++++++++++ dysnix/solana/templates/scripts/_start.tpl | 1 + dysnix/solana/values.yaml | 2 ++ 3 files changed, 17 insertions(+) diff --git a/dysnix/solana/README.md b/dysnix/solana/README.md index 896c2d5e..cedfe11b 100644 --- a/dysnix/solana/README.md +++ b/dysnix/solana/README.md @@ -2,6 +2,20 @@ A Helm chart to deploy Solana node inside Kubernetes cluster. +## UnableToSetOpenFileDescriptorLimit error + +This error means that containerd runtime has lower that 1,000,000 open files limit. +To fix this, you can set inside values the following: + +```yaml +securityContext: + capabilities: + add: + - SYS_RESOURCE + +ulimitTuneEnabled: true +``` + ## Parameters ### Global parameters diff --git a/dysnix/solana/templates/scripts/_start.tpl b/dysnix/solana/templates/scripts/_start.tpl index bc386093..d68f48a8 100644 --- a/dysnix/solana/templates/scripts/_start.tpl +++ b/dysnix/solana/templates/scripts/_start.tpl @@ -1,5 +1,6 @@ #!/bin/sh +{{ if .Values.ulimitTuneEnabled }}ulimit -n 1000000{{ end }} exec solana-validator {{- range $arg, $val := .Values.solanaArgs }} {{- if and $arg $val }} \{{ end }} diff --git a/dysnix/solana/values.yaml b/dysnix/solana/values.yaml index 93069c19..bf421a68 100644 --- a/dysnix/solana/values.yaml +++ b/dysnix/solana/values.yaml @@ -79,6 +79,8 @@ podSecurityContext: {} ## securityContext: {} +ulimitTuneEnabled: false + ## @param resources Set container requests and limits for CPU or memory ## Example: ## resources: From 9016e62256e89e8d0ab5675347b0632bbc90872c Mon Sep 17 00:00:00 2001 From: Vladyslav Deryhin Date: Mon, 3 Jun 2024 22:59:58 +0300 Subject: [PATCH 2/3] add solana ulimit --- dysnix/solana/Chart.yaml | 2 +- dysnix/solana/README.md | 2 +- dysnix/solana/templates/scripts/_start.tpl | 4 +++- dysnix/solana/values.yaml | 6 ++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dysnix/solana/Chart.yaml b/dysnix/solana/Chart.yaml index e7b9a1c7..2835d380 100644 --- a/dysnix/solana/Chart.yaml +++ b/dysnix/solana/Chart.yaml @@ -3,7 +3,7 @@ name: solana description: Solana blockchain node Helm chart type: application -version: 0.1.27 +version: 0.1.28 appVersion: "v1.17.34" keywords: diff --git a/dysnix/solana/README.md b/dysnix/solana/README.md index cedfe11b..30d30ebf 100644 --- a/dysnix/solana/README.md +++ b/dysnix/solana/README.md @@ -13,7 +13,7 @@ securityContext: add: - SYS_RESOURCE -ulimitTuneEnabled: true +increaseLimitNOFILE: true ``` ## Parameters diff --git a/dysnix/solana/templates/scripts/_start.tpl b/dysnix/solana/templates/scripts/_start.tpl index d68f48a8..3132ecfa 100644 --- a/dysnix/solana/templates/scripts/_start.tpl +++ b/dysnix/solana/templates/scripts/_start.tpl @@ -1,6 +1,8 @@ #!/bin/sh -{{ if .Values.ulimitTuneEnabled }}ulimit -n 1000000{{ end }} +{{- if .Values.increaseLimitNOFILE }} +ulimit -n 1000000 +{{- end }} exec solana-validator {{- range $arg, $val := .Values.solanaArgs }} {{- if and $arg $val }} \{{ end }} diff --git a/dysnix/solana/values.yaml b/dysnix/solana/values.yaml index bf421a68..93807913 100644 --- a/dysnix/solana/values.yaml +++ b/dysnix/solana/values.yaml @@ -79,8 +79,6 @@ podSecurityContext: {} ## securityContext: {} -ulimitTuneEnabled: false - ## @param resources Set container requests and limits for CPU or memory ## Example: ## resources: @@ -313,6 +311,10 @@ solanaArgs: minimal-snapshot-download-speed: 104857600 # 100 MB/s account-index: [] # indexing for better rpc performance +## @param increaseLimitNOFILE Increase number of file descriptors for Solana process. Requires `CAP_SYS_RESOURCE` +## +increaseLimitNOFILE: false + ## Graceful shutdown options ## gracefulShutdown: From bac25bd6a3491798565e3e27bb17f9dcef76a8b9 Mon Sep 17 00:00:00 2001 From: Vladyslav Deryhin Date: Mon, 3 Jun 2024 23:01:03 +0300 Subject: [PATCH 3/3] add solana ulimit --- dysnix/solana/README.md | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/dysnix/solana/README.md b/dysnix/solana/README.md index 30d30ebf..e3ffae84 100644 --- a/dysnix/solana/README.md +++ b/dysnix/solana/README.md @@ -82,25 +82,26 @@ increaseLimitNOFILE: true ### Solana node configuration -| Name | Description | Value | -| -------------------------------------------- | ------------------------------------------------------------------ | ---------------------------------------------------------------- | -| `solanaArgs` | `solana-validator` arguments | `{}` | -| `gracefulShutdown.timeout` | Seconds to wait for graceful shutdown | `120` | -| `gracefulShutdown.options` | `solana-validator exit` arguments | `{}` | -| `gracefulShutdown.options.force` | Do not wait for restart-window, useful for non-validators | `false` | -| `gracefulShutdown.options.skip-health-check` | Skip health check before exit | `false` | -| `gracefulShutdown.options.skip-health-check` | Skip check for a new snapshot before exit | `false` | -| `rustLog` | Logging configuration | `solana=info,solana_metrics=warn` | -| `plugins.enabled` | Enable download of Geyser plugins | `false` | -| `plugins.yellowstoneGRPC.enabled` | Enable download of Yellowstone gRPC | `false` | -| `plugins.yellowstoneGRPC.version` | Yellowstone gRPC version | `v1.14.2+solana.1.17.33` | -| `plugins.yellowstoneGRPC.baseUrl` | URL from where the plugin is downloaded | `https://github.com/rpcpool/yellowstone-grpc/releases/download/` | -| `plugins.yellowstoneGRPC.listenIP` | Yellowstone gRPC listen IP address, without port | `$(MY_POD_IP)` | -| `plugins.yellowstoneGRPC.config` | Yellowstone gRPC config.json file | `look in values.yaml` | -| `identity.validatorKeypair` | Validator keypair string (required) | `""` | -| `identity.voteKeypair` | Vote keypair string (required only for validator) | `""` | -| `identity.existingSecret` | Use existing secret with keypairs instead of specifying them above | `""` | -| `identity.mountPath` | Keypair files mount path | `/secrets` | +| Name | Description | Value | +| -------------------------------------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------- | +| `solanaArgs` | `solana-validator` arguments | `{}` | +| `increaseLimitNOFILE` | Increase number of file descriptors for Solana process. Requires `CAP_SYS_RESOURCE` | `false` | +| `gracefulShutdown.timeout` | Seconds to wait for graceful shutdown | `120` | +| `gracefulShutdown.options` | `solana-validator exit` arguments | `{}` | +| `gracefulShutdown.options.force` | Do not wait for restart-window, useful for non-validators | `false` | +| `gracefulShutdown.options.skip-health-check` | Skip health check before exit | `false` | +| `gracefulShutdown.options.skip-health-check` | Skip check for a new snapshot before exit | `false` | +| `rustLog` | Logging configuration | `solana=info,solana_metrics=warn` | +| `plugins.enabled` | Enable download of Geyser plugins | `false` | +| `plugins.yellowstoneGRPC.enabled` | Enable download of Yellowstone gRPC | `false` | +| `plugins.yellowstoneGRPC.version` | Yellowstone gRPC version | `v1.14.2+solana.1.17.33` | +| `plugins.yellowstoneGRPC.downloadURL` | From where the plugin needs to be downloaded | `https://github.com/rpcpool/yellowstone-grpc/releases/download/` | +| `plugins.yellowstoneGRPC.listenIP` | Yellowstone gRPC listen IP address, without port | `$(MY_POD_IP)` | +| `plugins.yellowstoneGRPC.config` | Yellowstone gRPC config.json file | `look in values.yaml` | +| `identity.validatorKeypair` | Validator keypair string (required) | `""` | +| `identity.voteKeypair` | Vote keypair string (required only for validator) | `""` | +| `identity.existingSecret` | Use existing secret with keypairs instead of specifying them above | `""` | +| `identity.mountPath` | Keypair files mount path | `/secrets` | ### Solana ledger db persistence config