-
Notifications
You must be signed in to change notification settings - Fork 56
fix(vespa-config): increased heap size for vespa #1112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughRemoves explicit JVM args for the main query container in docker-compose. Restructures Vespa services.xml by moving container node definitions, adding a nodes block, setting jvm allocated-memory to 15%, specifying a node hostalias, and reducing container threadpool maxthreads from 64 to 8. No functional control-flow changes noted. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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 |
Summary of ChangesHello @SahilKumar000, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the resource allocation for Vespa services by adjusting JVM memory settings and optimizing container thread pool configurations. The changes aim to improve the stability and performance of the Vespa deployment by providing a more explicit memory allocation strategy and reducing potential CPU contention. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates the Vespa configuration to increase the container heap size by switching from an environment variable (VESPA_CONTAINER_JVMARGS
) to a percentage-based allocation in services.xml
. This is a good approach for managing memory. My review includes a few suggestions to improve code style and consistency in services.xml
. Also, please note that docker-compose.infrastructure-cpu.yml
still contains the old VESPA_CONTAINER_JVMARGS
setting; you may want to remove it for consistency across configurations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
server/vespa/services.xml (3)
10-13
: Threadpool maxthreads=8 may throttle request concurrency
container.handler.threadpool.maxthreads=8
caps concurrent HTTP handler work (incl. /document/v1 and search). Withsearchnode.requestthreads.search=32
andsummary=8
, this can become the bottleneck.
- Verify latency/throughput under expected load; consider a higher cap (e.g., 32) if CPU allows.
24-52
: Memory headroom: container heap + proton limits could approach 100%
- Proton
resource-limits.memory=0.85
controls internal throttling; combined with a larger container heap, the node may run tight on memory.- Ensure container memory limits are set in Docker/infra and that combined process footprints leave OS headroom (swap off recommended).
Action: Validate effective process RSS at steady state and adjust either container heap percent or proton memory limit accordingly.
73-75
: Both container and content pinned to hostalias 'node1'This is fine for single-node/dev. If targeting multi-node/HA later, plan to separate hostaliases (or use counts) to avoid co-scheduling and single-point-of-failure.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
deployment/portable/docker-compose.infrastructure.yml
(0 hunks)server/vespa/services.xml
(1 hunks)
💤 Files with no reviewable changes (1)
- deployment/portable/docker-compose.infrastructure.yml
🔇 Additional comments (2)
server/vespa/services.xml (2)
18-21
: Align PR title with actual change magnitudeTitle says “increased heap size”, but
allocated-memory='15%'
might be lower than previous JVM args (removed in docker-compose). Please quantify before/after Xmx to avoid confusion and document in the PR.
18-21
: Confirm JVM heap sizing and reserved memory
<jvm allocated-memory="15%">
is valid under<container><nodes>
and sets the JVM max heap (-Xmx
) to 15% of available memory; it does not set-Xms
.- To reserve headroom for native/direct buffer allocations and the OS, consider adding
<jvm reserved-memory="…"/>
.- Verify at runtime (startup logs or
vespa-model-inspect
) that-Xmx
is applied as expected and that any Docker/cgroup memory limits are accounted for.
## [3.17.3](v3.17.2...v3.17.3) (2025-10-15) ### Bug Fixes * **vespa-config:** increased heap size for vespa ([#1112](#1112)) ([863f0b6](863f0b6))
Description
Testing
Additional Notes
Summary by CodeRabbit
Refactor
Chores
Impact