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

Sidekiq + Parallel performance issues #328

Open
joaopmrod opened this issue Sep 1, 2022 · 1 comment
Open

Sidekiq + Parallel performance issues #328

joaopmrod opened this issue Sep 1, 2022 · 1 comment

Comments

@joaopmrod
Copy link

I've been using Sidekiq + Parallel (https://github.com/grosser/parallel) together for a couple of years. Everything worked fine in in_processes paralellization. I would get basically the same performance when I ran Job.perform_now in the console and Job.perform_later.

This year I've upgraded my application to Ruby 3.0.2p107, Rails 6.1.6, Sidekiq 6.4.2 and Parallel 1.22 and I now get 1/10-20 the performance when the job runs in Sidekiq with perform_later.

class TestJob < ApplicationJob
  def perform
    Parallel.map(Model.all, in_processes: 5, progress: "Map") do |obj|
      heavy_task(obj)
    end
  end
end

The last time I could get an equal performance I was using Ruby 2.7.1, Rails 6.1.4,Sidekiq 6.2.1 and Parallel 1.20.

Extra info: peform_now in the console has the same performance in the new and old setup.

From my debug I think the 5 processes are running but I doubt they are running in parallel. I see that thing get slower and slower over the execution time.

Any ideia about what can be causing that?

@grosser
Copy link
Owner

grosser commented Sep 5, 2022

can you try with the old parallel + sidekiq versions and then update 1 at a time to see when it breaks?

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