Github issue-1095 Update memory request for prereg-booking#1097
Conversation
Reduce memory request from 1500Mi to 1250Mi in values.yaml. Signed-off-by: kameshsr <47484458+kameshsr@users.noreply.github.com>
WalkthroughThe Helm chart for prereg-booking is updated to reduce the container memory resource limit from 1500Mi to 1250Mi, optimizing resource allocation in the Kubernetes deployment configuration. ChangesResource Limit Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
helm/prereg-booking/values.yaml (1)
110-124:⚠️ Potential issue | 🟠 Major | 🏗️ Heavy liftMemory request is insufficient for the configured JVM heap size.
The memory request (1250Mi ≈ 1310MB) is significantly lower than the JVM maximum heap size (Xmx=1875M), creating a reliability risk:
- JVM heap alone exceeds the memory request by ~565MB
- JVM also requires memory for metaspace, thread stacks, direct buffers, code cache, and native allocations (typically 25-50% overhead)
- Under node memory pressure, Kubernetes may evict this pod when it legitimately uses memory above the request but within the limit
For Xmx=1875M, the memory request should be at least 2344M (1.25× heap size) to account for non-heap overhead.
Proposed fixes
Increase the memory request to align with JVM configuration:
requests: cpu: 250m - memory: 1250Mi + memory: 2400MiAlternatively, if cluster resources are constrained, reduce the JVM heap:
requests: cpu: 250m memory: 1250Mi additionalResources: - javaOpts: "-Xms1125M -Xmx1875M" + javaOpts: "-Xms625M -Xmx1000M"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@helm/prereg-booking/values.yaml` around lines 110 - 124, The memory request (resources.requests.memory) is too low for the configured JVM max heap in additionalResources.javaOpts (Xmx=1875M); update resources.requests.memory to at least 2344M (≈1.25× Xmx) to account for non-heap overhead and avoid evictions, or reduce the JVM Xmx in additionalResources.javaOpts to fit the current request (e.g., lower Xmx to ~1000–1500M) and keep resources.limits.memory ≥ Xmx; ensure the chosen values keep requests ≤ limits and update both resources.requests.memory and resources.limits.memory consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@helm/prereg-booking/values.yaml`:
- Around line 110-124: The memory request (resources.requests.memory) is too low
for the configured JVM max heap in additionalResources.javaOpts (Xmx=1875M);
update resources.requests.memory to at least 2344M (≈1.25× Xmx) to account for
non-heap overhead and avoid evictions, or reduce the JVM Xmx in
additionalResources.javaOpts to fit the current request (e.g., lower Xmx to
~1000–1500M) and keep resources.limits.memory ≥ Xmx; ensure the chosen values
keep requests ≤ limits and update both resources.requests.memory and
resources.limits.memory consistently.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 17f1f427-83a8-49d9-a1ea-6a434def714d
📒 Files selected for processing (1)
helm/prereg-booking/values.yaml
Reduce memory request from 1500Mi to 1250Mi in values.yaml.
Summary by CodeRabbit