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

Support gomemlimit from requests #22

Open
bohdand-weka opened this issue Jul 29, 2024 · 4 comments
Open

Support gomemlimit from requests #22

bohdand-weka opened this issue Jul 29, 2024 · 4 comments
Labels
question Further information is requested

Comments

@bohdand-weka
Copy link

As limits is some memory for burst cases, I think the better way to set gomemlimit is to set it within requests.

Is there a way to do this?

@KimMachineGun
Copy link
Owner

Did you mean limiting memory within a request like an HTTP request? It's not possible in Go. The Go memory limit system only sets the soft limit for the entire Go runtime.

@KimMachineGun KimMachineGun added the question Further information is requested label Jul 30, 2024
@KimMachineGun
Copy link
Owner

KimMachineGun commented Aug 2, 2024

@bohdand-weka
Please let me know if I understand your question correctly. If you think I did, I'll close this issue.

@bohdand-weka
Copy link
Author

Hi @KimMachineGun , thank you for reply.

The question is that pods are having memory request and memory limit, so can we choose which value to use, sometimes using requests is more accurate and prevents OOM, but some people likes to use limit.

@KimMachineGun
Copy link
Owner

KimMachineGun commented Aug 2, 2024

@bohdand-weka
Thank you for letting me know. I completely misunderstood 😅.

There is no way to retrieve memory requests from the system for now. So, the best way to use GOMEMLIMIT with memory requests is using Kubernetes Downward API.

This post might be helpful for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants