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

High CPU usage during ?healthcheck? #541

Open
Korenchkin opened this issue Dec 13, 2024 · 3 comments
Open

High CPU usage during ?healthcheck? #541

Korenchkin opened this issue Dec 13, 2024 · 3 comments

Comments

@Korenchkin
Copy link

hello,
every 10s i see moderately high cpu usage about 50% for about 2s (using top, "d.1")
i guess this one:
root 2618 0.0 0.0 1628 768 ? Ss 20:45 0:00 /bin/sh -c bundle exec sidekiqmon processes | grep ${HOSTNAME}
root 2625 0.0 0.3 459788 13232 ? Rl 20:45 0:00 /usr/local/bin/ruby /usr/local/bundle/bin/bundle exec sidekiqmon processes

spawns for every healthcheck

while not critical,some lower powered systems could be overwhelmed?
thanks,
pb

@Korenchkin
Copy link
Author

oh great,i'm the first one to be bothered,your way is the most official i found,so i need to suck it up,this world is not built for optimization :)
( https://stackoverflow.com/questions/50053577/how-to-check-health-of-docker-image-running-sidekiq )
so,i would call this low priority...unless it is only on my side or nobody noticed yet? (2 cores,not dedicated, lxc, i5-7600k)

@Korenchkin
Copy link
Author

Korenchkin commented Dec 13, 2024

ok,for now for me this in docker compose:
healthcheck:
# test: [ "CMD-SHELL", "bundle exec sidekiqmon processes | grep $${HOSTNAME}" ]
test: [ "CMD-SHELL", "ps axu|grep -i [s]idekiq\ 7" ]

(sorry,code block making fun of me)
this replaces launching something large every 10s with something much smaller :)
hope it does detect everything,but since i easily miss full disk,i think i'll be okay if it does not detect frozen process

@Freika
Copy link
Owner

Freika commented Dec 16, 2024

I may change it in the future, thanks!

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

2 participants