Skip to content
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

Set compactor memory limits #11970

Merged
merged 6 commits into from
Feb 16, 2024
Merged

Conversation

MasslessParticle
Copy link
Contributor

If compactor memory grows unbounded, the underlying node may issue a SIGTERM to stop in. In this case, the pod doesn't come back up and cluster performance is impacted.

This PR introduces a memory limit to the compactor so it'll OOM and be restarted by k8s

@MasslessParticle MasslessParticle requested a review from a team as a code owner February 15, 2024 19:36
@dannykopping
Copy link
Contributor

Just to add some further detail here, the compactor is being evicted (first SIGTERM-d then removed) by kubelet because of the lack of a memory limit.

Here are a couple queries validating the above.

@@ -62,6 +62,7 @@
container.mixin.readinessProbe.httpGet.withPort($._config.http_listen_port) +
container.mixin.readinessProbe.withTimeoutSeconds(1) +
k.util.resourcesRequests('4', '2Gi') +
k.util.resourcesLimits(null, '32Gi') +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest setting this 2x requests, and adding a note in the release notes for folks to set this limit to a figure appropriate for their env.

32Gi may not be appropriate in all cases.

Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dannykopping dannykopping enabled auto-merge (squash) February 16, 2024 16:02
@dannykopping dannykopping merged commit 918e736 into main Feb 16, 2024
8 checks passed
@dannykopping dannykopping deleted the tpatterson/compactor-resource-limtis branch February 16, 2024 16:22
rhnasc pushed a commit to inloco/loki that referenced this pull request Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants