Skip to content

Refresh percentage memory limits after cgroup changes - #15608

Open
hooiv wants to merge 1 commit into
open-telemetry:mainfrom
hooiv:feat/refresh-memorylimiter-cgroup-limits
Open

Refresh percentage memory limits after cgroup changes#15608
hooiv wants to merge 1 commit into
open-telemetry:mainfrom
hooiv:feat/refresh-memorylimiter-cgroup-limits

Conversation

@hooiv

@hooiv hooiv commented Jul 20, 2026

Copy link
Copy Markdown

Problem

Percentage-based memorylimiterprocessor thresholds are resolved once at startup. When Kubernetes changes a container memory limit in place, the processor continues enforcing the stale thresholds.

Solution

Refresh cgroup-backed percentage thresholds on each existing memory-check interval. If a refresh fails, retain the previous thresholds and log a warning. Fixed MiB limits are unchanged.

Addresses #15580.

Validation

  • go test . in internal/memorylimiter
  • go test . in processor/memorylimiterprocessor
  • git diff --check

Signed-off-by: ADITYA CHAUHAN hooiv@users.noreply.github.com

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 20, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: hooiv / name: ADITYA CHAUHAN (4c11b9c)

@hooiv
hooiv force-pushed the feat/refresh-memorylimiter-cgroup-limits branch 2 times, most recently from 4c11b9c to f45d115 Compare July 20, 2026 14:50
Problem: percentage memory limits are resolved once at startup, so in-place container resizes leave the memory limiter enforcing stale thresholds.

Solution: refresh cgroup-backed percentage thresholds on each memory check while retaining the previous thresholds when a refresh fails. Fixed MiB limits remain unchanged.

Validation: go test . in internal/memorylimiter; go test . in processor/memorylimiterprocessor

Signed-off-by: ADITYA CHAUHAN <125276621+hooiv@users.noreply.github.com>
@hooiv
hooiv force-pushed the feat/refresh-memorylimiter-cgroup-limits branch from f45d115 to ab4ccfa Compare July 20, 2026 14:50
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions Bot added the Stale label Aug 4, 2026
@hooiv
hooiv marked this pull request as ready for review August 4, 2026 05:42
@hooiv
hooiv requested a review from a team as a code owner August 4, 2026 05:42
@hooiv
hooiv requested a review from atoulme August 4, 2026 05:42
@github-actions github-actions Bot removed the Stale label Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant