ruby on rails - Is it possible to force concurrent jobs to run in separate Sidekiq processes? -


one of benefits of sidekiq on resqueue can run multiple jobs in same process. drawback, however, can't figure out how force set of concurrent jobs run in different processes.

here's use case: have generate 64m rows of data, , have 8 vcpus on amazon ec2 instance. i'd carve task 8 concurrent jobs generating 8m rows each. problem if i'm running 8 sidekiq processes, sidekiq decide run 2 or more of jobs in same process, , doesn't use 8 vcpus , takes longer finish. there way tell sidekiq worker use or force spread jobs in group evenly amongst processes?

answer can't easily, design. specialization leads spofs.

  1. you can create custom queue each process , create 1 job each queue.
  2. you can use jruby doesn't suffer same flaw.
  3. you can execute processing rake task spawn 1 process per job, ensuring load.
  4. you can carve 64 jobs instead of 8 , more load way.

i latter unless resulting i/o crushes machine.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -