-
Notifications
You must be signed in to change notification settings - Fork 200
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
feat: include memory limit in memory settings #1825
Conversation
// while it cannot fully prevent OOMs, it can help in reducing the chances of OOMs in edge cases. | ||
// the settings should prevent the collector from exceeding the memory request, | ||
// so one can set this to the same value as the memory request or higher to allow for some buffer for bursts. | ||
MemoryLimitMiB int `json:"memoryLimitMiB"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it is better to configure this as relative to the MemoryRequest field? (i/e with precentages or fractions relative to the request amount.)
// This option sets the limit on the memory usage of the collector. | ||
// since the memory limiter mechanism is heuristic, and operates on fixed intervals, | ||
// while it cannot fully prevent OOMs, it can help in reducing the chances of OOMs in edge cases. | ||
// the settings should prevent the collector from exceeding the memory request, | ||
// so one can set this to the same value as the memory request or higher to allow for some buffer for bursts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we write the k8s value that will map into? and state that it will impact when the collector is OOMed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a nit about the comments.
Also discussed offline about the need to make all the precntages sizes configurable
For cluster collector, we currently populate the resource request for memory with default value of
500MiB
.However, we do not set a limit on the resource request.
This PR adds a limit for memory request for the cluster collector, set by default to
1.25
times the memory request,625MiB
by default. It is not expected to be reached, but set as protection to guarantee we supply a small slack for extreme bursts, but capping the memory at a reasonable size to protect the cluster