Skip to content

Commit

Permalink
feat(k8s): use JVM_OPTS to reduce memory usage of LAPIS, increase LAP…
Browse files Browse the repository at this point in the history
…IS memory limits (#2053)
  • Loading branch information
corneliusroemer authored May 30, 2024
1 parent 13a7dee commit b3caf2a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
19 changes: 11 additions & 8 deletions kubernetes/loculus/templates/lapis-silo-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ spec:
{{- include "loculus.configProcessor" (dict "name" "lapis-silo-database-config" "dockerTag" $dockerTag) | nindent 8 }}
containers:
- name: silo
image: ghcr.io/genspectrum/lapis-silo:{{ $.Values.imageTags.lapisSilo }}
image: {{ $.Values.images.lapisSilo }}
resources:
requests:
memory: "100Mi"
cpu: "10m"
limits:
memory: "2Gi"
memory: "10Gi"
ports:
- containerPort: 8081
args:
Expand All @@ -41,17 +41,20 @@ spec:
- name: lapis-silo-shared-data
mountPath: /data
- name: lapis
image: ghcr.io/genspectrum/lapis-v2:{{ $.Values.imageTags.lapis }}
image: {{ $.Values.images.lapis }}
resources:
requests:
memory: "100Mi"
memory: "200Mi"
cpu: "10m"
limits:
memory: "500Mi"
memory: "5Gi"
ports:
- containerPort: 8080
args:
- "--silo.url=http://localhost:8081"
env:
- name: JVM_OPTS
value: -XX:+UseContainerSupport -XX:+UseG1GC -XX:MaxHeapFreeRatio=5 -XX:MinHeapFreeRatio=2 -XX:MaxGCPauseMillis=100
volumeMounts:
- name: lapis-silo-database-config-processed
mountPath: /workspace/database_config.yaml
Expand All @@ -60,14 +63,14 @@ spec:
mountPath: /workspace/reference_genomes.json
subPath: reference_genomes.json
- name: silo-preprocessing
image: ghcr.io/genspectrum/lapis-silo:{{ $.Values.imageTags.lapisSilo }}
image: {{ $.Values.images.lapisSilo }}
imagePullPolicy: IfNotPresent
resources:
requests:
memory: "100Mi"
memory: "10Mi"
cpu: "10m"
limits:
memory: "3Gi"
memory: "10Gi"
command:
- sh
- /silo_import_wrapper.sh
Expand Down
6 changes: 3 additions & 3 deletions kubernetes/loculus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1173,9 +1173,9 @@ auth:
insecureCookies: false
bannerMessage: "This is a development environment. Data will not be persisted."
additionalHeadHTML: '<script defer data-domain="main.loculus.org" src="https://plausible.io/js/script.js"></script>'
imageTags:
lapisSilo: "0.2.1"
lapis: "0.2.1"
images:
lapisSilo: "ghcr.io/genspectrum/lapis-silo:0.2.1"
lapis: "ghcr.io/genspectrum/lapis-v2:0.2.2"
secrets:
smtp-password:
type: raw
Expand Down

0 comments on commit b3caf2a

Please sign in to comment.