From fc7c564e44715c34982ccecb4d0c360f34ce9fd0 Mon Sep 17 00:00:00 2001 From: sido Date: Tue, 11 Sep 2018 12:25:28 +0200 Subject: [PATCH] optimized memory limits and removed cpu limit --- molgenis/questions.yml | 34 +++++++++--------------------- molgenis/templates/deployment.yaml | 2 +- molgenis/values.yaml | 11 +++++----- 3 files changed, 17 insertions(+), 30 deletions(-) diff --git a/molgenis/questions.yml b/molgenis/questions.yml index 475c8bd..9712fae 100644 --- a/molgenis/questions.yml +++ b/molgenis/questions.yml @@ -20,8 +20,8 @@ questions: group: "Version" label: Registry - variable: molgenis.image.tag - default: "stable" - description: "Select a MOLGENIS version (check the registry.molgenis.org or hub.docker.com for other tags)" + default: "" + description: "Select a MOLGENIS version (check the registry.molgenis.org or hub.docker.com for released tags)" type: string required: true group: "Version" @@ -61,36 +61,22 @@ questions: required: true group: "Services" label: Database password -- variable: molgenis.resources.limits.cpu - default: 1 - description: "CPU limit for this MOLGENIS instance" - type: enum - options: - - "1" - - "2" - - "3" - - "4" - required: true - group: "Resources" - label: CPU limit - variable: molgenis.resources.limits.memory default: 1250Mi - description: "Memory limit for this MOLGENIS instance" + description: "Memory limit for this MOLGENIS container" type: enum options: - "1250Mi" - - "1500Mi" - - "2000Mi" - "2500Mi" required: true group: "Resources" - label: Memory limit -- variable: molgenis.javaOpts - default: "-Xmx1g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" - description: "Java runtime options for the MOLGENIS instance" + label: Container memory limit +- variable: molgenis.javaOpts.maxHeapSpace + default: "1g" + description: "Maximum heap space MOLGENIS container JVM. Please not this should fit in your container memory limit" type: enum options: - - "-Xmx1g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" - - "-Xmx2g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" + - "1g" + - "2g" group: "Resources" - label: Java memory options + label: Maximum heap space diff --git a/molgenis/templates/deployment.yaml b/molgenis/templates/deployment.yaml index a718bba..2290ad8 100644 --- a/molgenis/templates/deployment.yaml +++ b/molgenis/templates/deployment.yaml @@ -46,7 +46,7 @@ spec: - name: admin.password value: {{ .adminPassword }} - name: CATALINA_OPTS - value: {{ .javaOpts }} + value: "-Xmx{{ .javaOpts.maxHeapSpace }} -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" ports: - containerPort: 8080 livenessProbe: diff --git a/molgenis/values.yaml b/molgenis/values.yaml index 873ef8b..844547e 100644 --- a/molgenis/values.yaml +++ b/molgenis/values.yaml @@ -17,12 +17,13 @@ ingress: molgenis: image: - repository: registry.molgenis.org + repository: registry.hub.docker.com name: molgenis/molgenis-app tag: stable pullPolicy: Always adminPassword: admin - javaOpts: "-Xmx1g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" + javaOpts: + maxHeapSpace: "1g" resources: limits: cpu: 1 @@ -47,12 +48,12 @@ elasticsearch: repository: docker.elastic.co/elasticsearch/elasticsearch tag: 5.5.3 pullPolicy: IfNotPresent - javaOpts: "-Xms512m -Xmx512m" + javaOpts: "-Xms1024m -Xmx1024m" clusterName: molgenis resources: limits: - cpu: 1 - memory: 1500Mi + cpu: 2 + memory: 3Gi requests: cpu: 100m memory: 1Gi