Support gomemlimit from requests
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?
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.
@bohdand-weka Please let me know if I understand your question correctly. If you think I did, I'll close this issue.
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.
@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.