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

[kimai2] Increase default resources #89

Closed
rhizoet opened this issue Sep 2, 2024 · 4 comments
Closed

[kimai2] Increase default resources #89

rhizoet opened this issue Sep 2, 2024 · 4 comments

Comments

@rhizoet
Copy link

rhizoet commented Sep 2, 2024

After the Upgrade to 4.2.4 of the kimai-chart, the Pod shows the Error OOMKilled.

This is because of the low limits of the resource-section of the memory with 256Mi.

This should by default increased to a minimum of 512Mi. I've set it to 1000Mi (it's only a limit) and now it works again. Please keep in mind that a lot of tools need more and more resources over the time.

@robjuz
Copy link
Owner

robjuz commented Nov 26, 2024

Do you have some recommendations about memory requests and limits? I like to set limit=request but I don't know if it's best practice

@mprenditore
Copy link

Just my 2c, limit=request is not a best practice, they have different purpose.
The request is like reserved resources (both memory and CPU) for the pod, and it should be equal to the baseline memory/cpu used by the application when running normally. It's used by the scheduler when creating a pod to check which of the available node have at least that amount of resources to ensure the application can run smoothly. It's also used by the Horizontal Pod Autoscaler to check the metrics against it in order to decide if threshold is passed and it needs to scale up.
Limits on other hand, are like max burstable limits, so in case of spikes the application can use more than the requests. CPU and memory limits impact differently the app tho.
While the CPU gets just throttled to the limit, if the memory limit is reached, the OOM Killer process will kill the pod.

That said, I usually set no limit for the CPU, if at a given time, an application might need all the CPU, it can use all the one not used by the rest of pods, therefore compute fast and free it shortly after.
For the memory instead, usually I set it to double the request but in some particular case, where I keep on having OOMkill, I raise it accordingly till doesn't get killed anymore.

Hope that helps

@robjuz
Copy link
Owner

robjuz commented Nov 26, 2024

Something like this?

resources:
limits:
memory: 512Mi
requests:
memory: 256Mi
cpu: 100m

@mprenditore
Copy link

@robjuz sorry for the late.
Based on my usage (I don't use it too much so it's idle most of the time) here my average usage:
CPU: 5m (spikes 20m)
Memory: 160MB (spikes at 190MB)

So the values you've proposed should be more than enough even for higher usage.

@robjuz robjuz closed this as completed in ab846b4 Dec 2, 2024
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

No branches or pull requests

3 participants