feat(deployment): make backend jvm options configurable - #7239
Conversation
|
Claude encountered an error after 3m 27s —— View job I'll analyze this and get back to you. |
|
Claude encountered an error after 3m 10s —— View job I'll analyze this and get back to you. |
|
Claude finished @clonder's task in 2m 39s —— View job Review:
|
| # Smaller backend heap, previews share one cluster | ||
| backendMaxRamPercentage: 25 |
There was a problem hiding this comment.
Preview resources.backend.limits.memory is 3Gi, so this drops the backend heap ceiling from ~2.25Gi to ~768Mi. Two things worth checking before merging:
MaxRAMPercentageis a ceiling, not a reservation. Combined with the already-setMaxHeapFreeRatio=5 -XX:MinHeapFreeRatio=2, the JVM already returns unused heap to the OS, so the steady-state RSS saving on the shared cluster may be near zero — the flag only bites once the heap actually needs to grow. What it does change is where the backend throwsOutOfMemoryError.- Previews are the main pre-merge test environment. With 25% here and 75% in prod, a preview can OOM on a workload (large submission, big seqSet export) that prod handles fine, and the failure will look like an app bug. If the goal is to bound what a preview can consume on the shared cluster, lowering
resources.backend.limits.memoryin this same file is the knob that actually caps the container footprint — and the heap then scales with it automatically at 75%.
Was the 25% figure validated against an actual preview run (e2e or a manual submission), or only via helm template? The PR checklist says manual testing was helm lint/template only, which doesn't cover the runtime effect that is the entire point of the change.
There was a problem hiding this comment.
If 25% is the default, I guess no validation is needed, since setting 25% is actually as if we wouldn't change anything, right? That's what I got from the PR description.
fhennig
left a comment
There was a problem hiding this comment.
Looks good to me!
I guess there could be more written about why we picked 75% as the default, but I'm also ok with just picking it now and running with it - as you said it's already configured like this on main. It's hard to pick good defaults.
Another choice would be 25%, the JVM default, if we really wanted to play it safe.
But I'm fine with 75%
I'm approving but maybe wait a few days to give Cornelius some time to have a look as well!
follow up to #7077 (comment). the backend heap share becomes a
backendMaxRamPercentagevalue (default 75, same as main, the other jvm flags stay fixed in the template), andvalues_preview_server.yamlsets 25 so previews go back to the jvm default heap. checked withhelm lint --strictandhelm templatefor default, e2e and preview values, the only rendered difference to main isMaxRAMPercentage=75.0becoming=75. the new top level key changesvaluesHashon every deployment, so the first upgrade after this restarts all pods once. lapis keeps its own hardcodedJVM_OPTS, out of scope here.PR Checklist
The implemented feature is covered by appropriate, automated tests.🚀 Preview: Add
previewlabel to enable