Can Sidekiq take advantage of multiple processor cores?

I'm new to Sidekiq and use it with Ruby on Amazon EC2 instances to do some work with ImageMagick with images.

During startup, I realized that every worker works on one core. I use EC2 c3.2xlarge machines and they have 8 cores. It shows that processor utilization is 15%, but one core is used at 100% and the rest use 0%.

Can Sidekiq use different processor cores for different workers? If possible, is it inefficiency caused by ImageMagic, and how can I get it to use other kernels?

+7
ruby amazon-ec2 imagemagick sidekiq
source share
1 answer

If you want to use multiple cores using MRI, you will need to start several Sidekiq processes; with multiple threads configured for your sidekiq instance is not enough.

So, if you want to use all 8 cores, you have to start 8 processes. All of them will be loaded from one queue, so there is no need to worry about the processed tasks being processed several times.

+17
source share

All Articles