Repository navigation
Conversation
Add DUCKGRES_K8S_WORKER_MEMORY_REQUEST_PERCENT (75-100, default 100). It lowers the memory request of workers of 64Gi or more. The limit and the DuckDB memory_limit do not change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GepAgyXv5zVvQV5cbnRF8F
Test Impact PlanDeterministic summary of how this PR changes tests, CI runners, and coverage-risk signals. Summary
Signals
Coverage risk: neutral or increased No coverage-reduction warnings detected. |
The constant is unused without the kubernetes build tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GepAgyXv5zVvQV5cbnRF8F
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A worker pod requests its whole memory limit, but DuckDB's
memory_limitis at most 75% of the pod. The rest is headroom that large workers rarely use. The scheduler reserves it anyway, for every large worker and for every headroom placeholder, so nodes run mostly empty.Evidence from one fleet (7 days, 10-minute peaks):
Replaying the same 7 days of pods with a 75% request for large workers needs about 20% fewer node vCPUs.
Change
DUCKGRES_K8S_WORKER_MEMORY_REQUEST_PERCENT, 75 to 100. Unset means 100: no change in behavior. An invalid value logs a warning and is ignored.memory_limit, the thread count and billing size do not change.memory_limit. Only the headroom above it is shared between the workers of a node.workerMemoryHygieneEnvnow reads the memory limit instead of the request. Otherwise a lowered request would also lowerDUCKGRES_MEMORY_LIMITandGOMEMLIMIT.Trade-off
docs/design/connection-string-worker-profile.mdsays Guaranteed QoS MUST be preserved. I changed that to "by default" with this opt-in exception. Please check that the reason for the rule still allows it.Testing
memory_limit(1 to 512Gi), memory env follows the limit, placeholder fallback size, env parsing.go test -tags kubernetes ./controlplane/ ./configresolve/andgo vetpass.golangci-lintreports the same issues as before the change.Rollback
🤖 Generated with Claude Code
https://claude.ai/code/session_01GepAgyXv5zVvQV5cbnRF8F