Repository navigation
[dbsp] Drop page cache so a lower memory limit can apply on resize - #7903
Merged
Merged
Conversation
xiasongh
force-pushed
the
song/feldera-memory-limit-resize-401382
branch
from
November 9, 2026 20:05
9e2103f to
cceb044
Compare
xiasongh
marked this pull request as ready for review
November 9, 2026 20:06
Contributor
|
What I ran (debug, at
Gates
Missing test cases (medium)
|
Member
|
I noticed that this avoids dropping files that are still mutable, but I think it's OK to drop those anyway because we write them sequentially. |
Member
|
I think there's a sysctl to drop the whole page cache. It might be easier. |
Contributor
Author
do you mean |
Member
+- Kubernetes lowers a pod's memory limit only when the pod's memory use, page cache included, is
+ below the new limit. To get there, the pipeline drops its storage files from the page cache,
+ for at most 30 minutes. Reads from storage are slower until the cache fills again.Everything involving storage might be slower permanently since we're caching less. |
blp
approved these changes
Nov 9, 2026
blp
left a comment
Member
There was a problem hiding this comment.
This is a lot, but I don't see a problem with it. Thank you!
xiasongh
force-pushed
the
song/feldera-memory-limit-resize-401382
branch
from
November 10, 2026 02:47
cceb044 to
27df58a
Compare
Kubernetes lowers a pod's memory limit only when usage, page cache included, is below it. On a resize, drop storage files from the page cache until it is. The memory budget is now min(max_rss, memory_max), also at startup.
xiasongh
force-pushed
the
song/feldera-memory-limit-resize-401382
branch
from
November 10, 2026 03:25
27df58a to
330e986
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.
Kubernetes lowers a running pod's memory limit only when its memory use, page cache included, is below the new limit. Page cache can block a resize down forever.
posix_fadvise(DONTNEED)) until the limit applies. Each pass stops after 500 ms; the drop stops after 30 min.set_max_rss_bytesbecomesset_memory_limit(max_rss, container_limit).min(max_rss, memory_max), also at startup. Adatafusion_memoryofmemory_maxor more now fails to start. See the changelog.Tested on k3d: a 3G to 1500M resize held up by page cache applied in 12 s, with no restart.