Javier Rodríguez
Javier Rodríguez

Reputation: 11

Sidekiq performance issues. Htop shows multiple sidekiq processes

I'm having some performance issues with sidekiq in my production server. My server has 2 cores, and I have sidekiq configured with concurrency 8 but should be only one sidekiq process, that means that should be using just one core.

I also have one task that send one email to users and it's scheduling about 15K sidekiq jobs to send the emails. When that happens, users that receive the email start accessing the web and the server reaches 100% cpu usage very quickly.

I was checking htop and looks like there are about 9 sidekiq process, but with ps aux I can only see one, also in sidekiq panel says that there is only 1 process with 8 threads. My concern is that maybe sidekiq is ussing both cores or maybe there are more than one sidekiq process.

Why is htop showing so much sidekiq processes with different ids? htop showing multiple processes

I added also the CPU id in the htop to know which core is executing each process and I see that sidekiq process are using both cores. I think that maybe there is one sidekiq main process and others are child processes for each thread but in that case I would say that should run in the same core and that is not happening.

I'm worried because puma cannot attend user requests probably because sidekiq is using both cores. I know that one of the best solutions would be to have a dedicated server just for sidekiq, but I would like to have everything in the same server.

How can I configure sidekiq to avoid problems with puma and performance issues?

Upvotes: 0

Views: 115

Answers (0)

Related Questions