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

Information request about scalability and concurrency settings #6247

Open
vvayngart1 opened this issue Apr 3, 2024 · 1 comment
Open

Information request about scalability and concurrency settings #6247

vvayngart1 opened this issue Apr 3, 2024 · 1 comment

Comments

@vvayngart1
Copy link

vvayngart1 commented Apr 3, 2024

ruby-2.7.6
rails 6.1.7.6
Sidekiq (6.5.12)
redis_version:4.0.9
Sidekiq-pro (5.5.5)

Good afternoon

I'm looking for information on the following topics:

  • How can I configure a particular number of Sidekiq processes to run?
  • Is the :concurrency: setting referring to a number of threads/processes or a number of processes?
  • If :concurrency: setting refers to a number of threads per process, is it correct that they can use the Singleton object's instance? To clarify, if I want to establish and reuse only 1 TCP/IP connection without opening 1/thread, can I do this?
  • Any information or links to credible sources on general guidelines for below items is greatly appreciated:
    • General principles for setting up in concert with each other:
      • Sidekiq concurrency (processes/threads)
      • Rails concurrency
      • CPU settings

Thanks in advance

@mperham
Copy link
Collaborator

mperham commented Apr 3, 2024

How can I configure a particular number of Sidekiq processes to run?

With Sidekiq Enterprise you'd use sidekiqswarm and the SIDEKIQ_COUNT variable. You can use other tools to run multiple processes but we don't provide documentation for any particular tool.

Concurrency is the thread count within each Sidekiq process. Yes, they can use Singleton.

You can use RAILS_MAX_THREADS to control all the knobs for Sidekiq and Rails concurrency in one setting.

RAILS_MAX_THREADS=5 SIDEKIQ_COUNT=8 bundle exec sidekiqswarm

will get you 8 processes with 5 threads or a total job concurrency of 40.

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