feat(canopy): shm_size_floor spec + intent-driven floors#83
Merged
Conversation
ae585e2 to
36b9625
Compare
Re-land the shm-floor knob from the closed #80 on top of the CR materialisation refactor. `compute_shm_and_shared_buffers` derives shm from the pod's memory request/limit; for analytics workloads that derived value is often lower than what shared_buffers benefits from, and bumping memory request just to raise shm burns k8s scheduling budget for no real gain. Adds: - `PostgresPhysicalReplicaSpec.shmSizeFloor: Option<Quantity>` — the Deployment builder now takes `max(computed_shm, floor)` and scales `shared_buffers_mb` proportionally so postgres actually uses the extra shm. - `IntentConfig.shm_size_floor` (verify: 512Mi, analytics-dev / -dbt: 2Gi) — materialised into the CR spec by IntentConfig::to_replica_spec.
c026bba to
696fc6c
Compare
36b9625 to
9fea1e9
Compare
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.
🤖 Stacks on #82. Re-lands the shm-floor knob from the closed #80 on top
of the CR-materialisation refactor.
compute_shm_and_shared_buffersderives shm from the postgres pod'smemory request/limit. For analytics-shaped workloads the derived value
is often lower than what
shared_buffersactually benefits from, andbumping memory request just to raise shm burns k8s scheduling budget
for no real gain.
shm_size_floorgives the intent (or a user, on thelegacy path) a way to raise shm without touching request/limit.
Adds:
PostgresPhysicalReplicaSpec.shmSizeFloor: Option<Quantity>— theDeployment builder now takes
max(computed_shm, floor)and scalesshared_buffers_mbproportionally so postgres actually uses theextra shm (postgres wants ~70% of shm for
shared_buffers).IntentConfig.shm_size_floorper intent — verify: 512Mi,analytics-dev / analytics-dbt: 2Gi.
IntentConfig::to_replica_specmaterialises this onto
spec.shmSizeFloorwhen the syncerpatches the canopy-managed CR.
Legacy CR authors can also set
shmSizeFloordirectly if theirresource-derived shm undersizes
shared_buffersfor their workload.