Skip to content

Commit bba2314

Browse files
authored
[RONDB-885] Allow setting TotalMemoryConfig (#48)
1 parent 40fdc14 commit bba2314

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

Diff for: Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: rondb
55

66
# This is the chart version. This version number should be incremented each time you make changes
77
# to the chart and its templates, including the app version.
8-
version: 0.6.7
8+
version: 0.6.8
99

1010
# This is the version number of the application being deployed. This version number should be
1111
# incremented each time you make changes to the application.

Diff for: files/configs/config.ini

+8
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ AutomaticMemoryConfig=true
6969
NumCPUs={{ printf "%.0f" (mulf .Values.resources.limits.cpus.ndbmtds 0.9) }}
7070
{{- end }}
7171

72+
{{- if .Values.rondbConfig.TotalMemoryConfig }}
73+
{{- /*
74+
the automatic memory configuration relay of cgroup v2
75+
so if older version of cgroup is used the use has to inform RonDB how much memory to use
76+
*/}}
77+
TotalMemoryConfig={{ .Values.rondbConfig.TotalMemoryConfig }}
78+
{{- else }}
7279
{{- if le (.Values.resources.limits.memory.ndbmtdsMiB | int) 5000 }}
7380
{{- /*
7481
When the container memory is less than 5GiB, the automatic memory configuration
@@ -79,6 +86,7 @@ NumCPUs={{ printf "%.0f" (mulf .Values.resources.limits.cpus.ndbmtds 0.9) }}
7986
{{- $intermediateResult := mul .Values.resources.limits.memory.ndbmtdsMiB 75 }}
8087
TotalMemoryConfig={{ div $intermediateResult 100 }}M
8188
{{- end }}
89+
{{- end }}
8290

8391
{{ if .Values.rondbConfig.DiskPageBufferMemory -}}
8492
DiskPageBufferMemory={{ .Values.rondbConfig.DiskPageBufferMemory }}

Diff for: values.schema.json

+8
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,14 @@
12891289
"type": "integer",
12901290
"description": "One of the primary methods of discovering failed nodes is by the use of heartbeats. This parameter states how often heartbeat signals are sent and how often to expect to receive them. Heartbeats cannot be disabled. After missing four heartbeat intervals in a row, the node is declared dead. Thus, the maximum time for discovering a failure through the heartbeat mechanism is five times the heartbeat interval.",
12911291
"default": 5000
1292+
},
1293+
"TotalMemoryConfig": {
1294+
"type": [
1295+
"string",
1296+
"null"
1297+
],
1298+
"description": "The total memory configured by RonDB datanode. By default it is not defined and memory is calculated automatically.",
1299+
"default": null
12921300
}
12931301
},
12941302
"required": [

Diff for: values.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ rondbConfig:
313313
ReservedConcurrentOperations: null
314314
SchemaMemory: null
315315
SharedGlobalMemory: null
316+
TotalMemoryConfig: null
316317
TransactionDeadlockDetectionTimeout: 1500
317318
TransactionInactiveTimeout: 15000
318319
TransactionMemory: null

0 commit comments

Comments
 (0)