Skip to content

Commit 79f21ec

Browse files
authored
Merge pull request #2249 from beyonnex-io/enhance-helm-options
enhance Helm config options by G1 GC tuning; thing supervisor ask timeout config
2 parents e8c2e64 + c18bef2 commit 79f21ec

File tree

10 files changed

+75
-5
lines changed

10 files changed

+75
-5
lines changed

base/service/src/main/java/org/eclipse/ditto/base/service/config/supervision/LocalAskTimeoutConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ enum LocalAskTimeoutConfigValue implements KnownConfigValue {
5959
/**
6060
* The local ask timeout duration.
6161
*/
62-
ASK_TIMEOUT("timeout", Duration.ofSeconds(2L)),
62+
ASK_TIMEOUT("timeout", Duration.ofSeconds(5L)),
6363

6464
/**
6565
* The local ask timeout duration during persistence actor recovery.

deployment/helm/ditto/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ description: |
1616
A digital twin is a virtual, cloud based, representation of his real world counterpart
1717
(real world “Things”, e.g. devices like sensors, smart heating, connected cars, smart grids, EV charging stations etc).
1818
type: application
19-
version: 3.8.4 # chart version is effectively set by release-job
19+
version: 3.8.5 # chart version is effectively set by release-job
2020
appVersion: 3.8.2
2121
keywords:
2222
- iot-chart

deployment/helm/ditto/templates/connectivity-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ spec:
144144
-XX:InitialRAMPercentage={{ .Values.connectivity.jvm.heapRamPercentage }}
145145
-XX:MaxGCPauseMillis={{ .Values.connectivity.jvm.maxGcPauseMillis }}
146146
-XX:G1ReservePercent={{ .Values.connectivity.jvm.g1ReservePercent }}
147+
-XX:+UnlockExperimentalVMOptions
148+
-XX:G1NewSizePercent={{ .Values.connectivity.jvm.g1NewSizePercent }}
149+
-XX:G1MaxNewSizePercent={{ .Values.connectivity.jvm.g1MaxNewSizePercent }}
147150
{{ .Values.connectivity.additionalJvmOptions }}
148151
{{ .Values.global.pekkoOptions }}
149152
{{- if .Values.global.logging.customConfigFile.enabled }}

deployment/helm/ditto/templates/gateway-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ spec:
144144
-XX:InitialRAMPercentage={{ .Values.gateway.jvm.heapRamPercentage }}
145145
-XX:MaxGCPauseMillis={{ .Values.gateway.jvm.maxGcPauseMillis }}
146146
-XX:G1ReservePercent={{ .Values.gateway.jvm.g1ReservePercent }}
147+
-XX:+UnlockExperimentalVMOptions
148+
-XX:G1NewSizePercent={{ .Values.gateway.jvm.g1NewSizePercent }}
149+
-XX:G1MaxNewSizePercent={{ .Values.gateway.jvm.g1MaxNewSizePercent }}
147150
{{ .Values.gateway.additionalJvmOptions }}
148151
{{ .Values.global.pekkoOptions }}
149152
{{- if .Values.global.logging.customConfigFile.enabled }}

deployment/helm/ditto/templates/nginx-configmap.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ data:
3232
default_type application/json;
3333
include mime.types;
3434
server_tokens off;
35+
merge_slashes on;
3536
3637
client_body_temp_path /tmp/client_temp;
3738
proxy_temp_path /tmp/proxy_temp_path;
@@ -55,8 +56,6 @@ data:
5556
client_header_buffer_size 8k; # allow longer URIs + headers (default: 1k)
5657
large_client_header_buffers 4 16k;
5758
58-
merge_slashes off; # allow multiple slashes for CRS Authentication
59-
6059
map $http_authorization $authentication {
6160
default "Authentication required";
6261
"~Bearer" "off";

deployment/helm/ditto/templates/policies-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ spec:
144144
-XX:InitialRAMPercentage={{ .Values.policies.jvm.heapRamPercentage }}
145145
-XX:MaxGCPauseMillis={{ .Values.policies.jvm.maxGcPauseMillis }}
146146
-XX:G1ReservePercent={{ .Values.policies.jvm.g1ReservePercent }}
147+
-XX:+UnlockExperimentalVMOptions
148+
-XX:G1NewSizePercent={{ .Values.policies.jvm.g1NewSizePercent }}
149+
-XX:G1MaxNewSizePercent={{ .Values.policies.jvm.g1MaxNewSizePercent }}
147150
{{ .Values.policies.additionalJvmOptions }}
148151
{{- .Values.global.pekkoOptions }}
149152
{{- if .Values.global.logging.customConfigFile.enabled }}

deployment/helm/ditto/templates/things-deployment.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ spec:
144144
-XX:InitialRAMPercentage={{ .Values.things.jvm.heapRamPercentage }}
145145
-XX:MaxGCPauseMillis={{ .Values.things.jvm.maxGcPauseMillis }}
146146
-XX:G1ReservePercent={{ .Values.things.jvm.g1ReservePercent }}
147+
-XX:+UnlockExperimentalVMOptions
148+
-XX:G1NewSizePercent={{ .Values.things.jvm.g1NewSizePercent }}
149+
-XX:G1MaxNewSizePercent={{ .Values.things.jvm.g1MaxNewSizePercent }}
147150
{{ .Values.things.additionalJvmOptions }}
148151
{{ .Values.global.pekkoOptions }}
149152
{{- if .Values.global.logging.customConfigFile.enabled }}
@@ -273,6 +276,12 @@ spec:
273276
value: "{{ .Values.things.config.policiesEnforcer.cache.expireAfterAccess }}"
274277
- name: MERGE_REMOVE_EMPTY_OBJECTS_AFTER_PATCH_CONDITION_FILTERING
275278
value: "{{ .Values.things.config.merge.removeEmptyObjectsAfterPatchConditionFiltering }}"
279+
- name: THINGS_SUPERVISOR_LOCAL_ASK_TIMEOUT
280+
value: "{{ .Values.things.config.supervisor.localAskTimeout }}"
281+
- name: THINGS_SUPERVISOR_LOCAL_ASK_TIMEOUT_DURING_RECOVERY
282+
value: "{{ .Values.things.config.supervisor.localAskTimeoutDuringRecovery }}"
283+
- name: THINGS_SUPERVISOR_LOCAL_ASK_ENFORCER_TIMEOUT
284+
value: "{{ .Values.things.config.supervisor.localAskEnforcerTimeout }}"
276285
- name: THINGS_WOT_TO_THING_DESCRIPTION_BASE_PREFIX
277286
value: "{{ .Values.things.config.wot.tdBasePrefix }}"
278287
- name: THINGS_WOT_THING_MODEL_CACHE_SIZE

deployment/helm/ditto/templates/thingssearch-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ spec:
144144
-XX:InitialRAMPercentage={{ .Values.thingsSearch.jvm.heapRamPercentage }}
145145
-XX:MaxGCPauseMillis={{ .Values.thingsSearch.jvm.maxGcPauseMillis }}
146146
-XX:G1ReservePercent={{ .Values.thingsSearch.jvm.g1ReservePercent }}
147+
-XX:+UnlockExperimentalVMOptions
148+
-XX:G1NewSizePercent={{ .Values.thingsSearch.jvm.g1NewSizePercent }}
149+
-XX:G1MaxNewSizePercent={{ .Values.thingsSearch.jvm.g1MaxNewSizePercent }}
147150
{{ .Values.thingsSearch.additionalJvmOptions }}
148151
{{ .Values.global.pekkoOptions }}
149152
{{- if .Values.global.logging.customConfigFile.enabled }}

deployment/helm/ditto/values.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ global:
110110
-Xss512k
111111
-XX:MaxMetaspaceSize=256m
112112
-XX:+UseG1GC
113+
-XX:+ParallelRefProcEnabled
113114
-Djava.net.preferIPv4Stack=true
114115
pekkoOptions: >
115116
-Dpekko.management.cluster.bootstrap.contact-point-discovery.port-name=management
@@ -653,6 +654,14 @@ policies:
653654
# g1ReservePercent configures the used G1 GC "amount of heap to keep free after a mixed GC"
654655
# default (by JVM if not set): 10
655656
g1ReservePercent: 10
657+
# g1NewSizePercent sets the percentage of the heap size to use as default minimum young (new) generation
658+
# default (by JVM if not set): 5
659+
g1NewSizePercent: 5
660+
# g1MaxNewSizePercent sets the maximum percentage of the heap that can be allocated to the young (new) generation
661+
# when using the G1 garbage collector. This helps control the size of the young generation, affecting GC pause times
662+
# and overall memory management.
663+
# default (by JVM if not set): 60
664+
g1MaxNewSizePercent: 60
656665
# startupProbe configuration for policies
657666
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
658667
startupProbe:
@@ -931,6 +940,14 @@ things:
931940
# g1ReservePercent configures the used G1 GC "amount of heap to keep free after a mixed GC"
932941
# default (by JVM if not set): 10
933942
g1ReservePercent: 10
943+
# g1NewSizePercent sets the percentage of the heap size to use as default minimum young (new) generation
944+
# default (by JVM if not set): 5
945+
g1NewSizePercent: 5
946+
# g1MaxNewSizePercent sets the maximum percentage of the heap that can be allocated to the young (new) generation
947+
# when using the G1 garbage collector. This helps control the size of the young generation, affecting GC pause times
948+
# and overall memory management.
949+
# default (by JVM if not set): 60
950+
g1MaxNewSizePercent: 60
934951
# startupProbe configuration for things
935952
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
936953
startupProbe:
@@ -1023,6 +1040,15 @@ things:
10231040
timeout: 20s
10241041
# reset after this time in "Open" state, the circuit breaker is "Half-opened" again
10251042
reset: 8s
1043+
# supervisor contains configuration about things supervisor actors
1044+
supervisor:
1045+
# localAskTimeout the local ask timeout duration
1046+
localAskTimeout: 5s
1047+
# localAskTimeoutDuringRecovery the local ask timeout duration during persistence actor recovery
1048+
localAskTimeoutDuringRecovery: 45s
1049+
# localAskEnforcerTimeout the local ask timeout duration for interaction with enforcer child
1050+
# needs to be higher than localAskTimeout as policies have to be loaded from cache via remoting
1051+
localAskEnforcerTimeout: 10s
10261052
# cleanup contains the configuration for the background cleanup of stale snapshots and events
10271053
cleanup:
10281054
# enabled configures whether background cleanup is enabled or not
@@ -1358,6 +1384,14 @@ thingsSearch:
13581384
# g1ReservePercent configures the used G1 GC "amount of heap to keep free after a mixed GC"
13591385
# default (by JVM if not set): 10
13601386
g1ReservePercent: 10
1387+
# g1NewSizePercent sets the percentage of the heap size to use as default minimum young (new) generation
1388+
# default (by JVM if not set): 5
1389+
g1NewSizePercent: 5
1390+
# g1MaxNewSizePercent sets the maximum percentage of the heap that can be allocated to the young (new) generation
1391+
# when using the G1 garbage collector. This helps control the size of the young generation, affecting GC pause times
1392+
# and overall memory management.
1393+
# default (by JVM if not set): 60
1394+
g1MaxNewSizePercent: 60
13611395
# startupProbe configuration for policies
13621396
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
13631397
startupProbe:
@@ -1634,6 +1668,14 @@ connectivity:
16341668
# g1ReservePercent configures the used G1 GC "amount of heap to keep free after a mixed GC"
16351669
# default (by JVM if not set): 10
16361670
g1ReservePercent: 10
1671+
# g1NewSizePercent sets the percentage of the heap size to use as default minimum young (new) generation
1672+
# default (by JVM if not set): 5
1673+
g1NewSizePercent: 5
1674+
# g1MaxNewSizePercent sets the maximum percentage of the heap that can be allocated to the young (new) generation
1675+
# when using the G1 garbage collector. This helps control the size of the young generation, affecting GC pause times
1676+
# and overall memory management.
1677+
# default (by JVM if not set): 60
1678+
g1MaxNewSizePercent: 60
16371679
# startupProbe configuration for connectivity
16381680
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
16391681
startupProbe:
@@ -1969,6 +2011,14 @@ gateway:
19692011
# g1ReservePercent configures the used G1 GC "amount of heap to keep free after a mixed GC"
19702012
# default (by JVM if not set): 10
19712013
g1ReservePercent: 10
2014+
# g1NewSizePercent sets the percentage of the heap size to use as default minimum young (new) generation
2015+
# default (by JVM if not set): 5
2016+
g1NewSizePercent: 5
2017+
# g1MaxNewSizePercent sets the maximum percentage of the heap that can be allocated to the young (new) generation
2018+
# when using the G1 garbage collector. This helps control the size of the young generation, affecting GC pause times
2019+
# and overall memory management.
2020+
# default (by JVM if not set): 60
2021+
g1MaxNewSizePercent: 60
19722022
# startupProbe configuration for gateway
19732023
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
19742024
startupProbe:

things/service/src/main/resources/things.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ ditto {
212212
}
213213

214214
local-ask {
215-
timeout = 2s
215+
timeout = 5s
216216
timeout = ${?THINGS_SUPERVISOR_LOCAL_ASK_TIMEOUT}
217217

218218
timeout-during-recovery = 45s

0 commit comments

Comments
 (0)