-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
High CPU usage after update #1000
Comments
It might be more performance or native processing? I'll explore health checks, thanks for reporting! |
I looked around a bit and this seems like the most viable way. Would you like to tweak this and then submit a patch yourself (so we can give you credit through commits)? |
@BYK thank you for a swift reply 🙏
I'll play with the intervals on our instance and I'll get back with whether the 30s interval actually solves the CPU credit drainage 👌 The patch should be easy then, definitely can do 🙂 |
The 30s interval seems to be working fine. The average CPU usage went up from hour-average ~12% to ~17%. There are some opened issues related to Docker Healthchecks' cpu usage:
Possibly healthchecks can be updated to run more often once these get resolved. PR coming soon. |
The 2s interval caused constantly high CPU usage. 30s interval with 3 retries is the Docker default and doesn't hurt the system that much. Fixes getsentry#1000
We may wanna reference these issues in the code as a note to any future users/maintainers. |
) The 2s interval caused constantly high CPU usage. 30s interval with 3 retries is the Docker default and doesn't hurt the system that much. Fixes #1000
Version Information
Version: branch 21.6.1
Steps to Reproduce
./install.sh
. There was an error with a docker network having an active endpoint, so I restarted docker, then install script finished and sentry started.t3a.large
instance (2vcpu, 8gb ram). The server began to burn through the CPU credits it saved up.redis
,memcached
andpostgres
containers. Looking through commits, feat: Add healthchecks for redis, memcached and postgres #975 matched the description. I commented out the added lines in my docker-compose and the issue went away.Expected Result
Relatively low cpu usage even though the instance isn't a massive beast. We have ~890 events per 24hrs.
Actual Result
The CPU was constantly spiking,
Logs
What you saw along the way, e.g.:
Latest install logs
Nothing really relevant in docker compose logs I believe, can provide if requested though.
Resolution
The healthchecks introduced in #975 seem to be CPU expensive, even though the commands don't look terribly expensive. Maybe reducing the interval to 30s would work for smaller instances?
There seems to be something else that's eating the CPU noticeably more than before the update, I'll have a closer look later if CPU credits keep decreasing.
The text was updated successfully, but these errors were encountered: