How to set Sidekiq worker count?

4,597 views
Skip to first unread message

Christoph Kretzschmar

unread,
Mar 5, 2013, 1:58:32 AM3/5/13
to gitl...@googlegroups.com
Hi there,

just got a little question. I want to use the Gitlab for productional internal usage, the problem is that it will never be so big that 25 workers of Sidekiq will be ever needed.
So I read the documentation about Sidekiq and so on but I am not a ruby developer and got no functional clue how to set the worker count. I googled and didn't found the answer neither....

I defined a sidekiq.yml inside the config dir and set the concurrency, but with no effect on the count of the workers themselves. Also tried to set the -c option in the Procfile, same result...

So how does the magic work and why is it not documented in your Troubleshooting catalog? :)

Regards,
Christoph Kretzschmar

Holger Rusch

unread,
Mar 14, 2013, 3:04:48 PM3/14/13
to gitl...@googlegroups.com
I would really like to reduce the count too. To much memory used for my small needs.

Any hints?

Vitaliy Dj

unread,
Apr 9, 2013, 5:31:56 PM4/9/13
to gitl...@googlegroups.com
Hi I'm not ruby developer too, but I'm added this option to config

vim /home/git/gitlab/config/initializers/4_sidekiq.rb

Sidekiq.configure_server do |config|
 config.options[:concurrency] = 2
 config.redis = {
    url: resque_url,
    namespace: 'resque:gitlab'
  }
end

but, there is still too many of them and they eat memory

13298 git        20   0  940M  121M  7748 S  0.0 12.2  0:00.00 unicorn_rails master -c /home/git/gitlab/config/unicorn.rb -E production
13317 git        20   0  940M  121M  7748 S  0.0 12.2  0:00.00 unicorn_rails master -c /home/git/gitlab/config/unicorn.rb -E production
13235 git        20   0  940M  121M  7748 S  0.0 12.2  0:05.46 unicorn_rails master -c /home/git/gitlab/config/unicorn.rb -E production
13295 git        20   0 40952  8024  2776 S  0.0  0.8  0:00.03 python2 /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/gitlab-pygments.rb-0.3.2/lib/pygments/mentos.py
13309 git        20   0 1420M  130M  7984 S  0.0 13.1  0:00.00 sidekiq 2.7.5 gitlab [0 of 2 busy]
13312 git        20   0 1420M  130M  7984 S  0.0 13.1  0:00.00 sidekiq 2.7.5 gitlab [0 of 2 busy]
13313 git        20   0 1420M  130M  7984 S  0.0 13.1  0:00.00 sidekiq 2.7.5 gitlab [0 of 2 busy]
13314 git        20   0 1420M  130M  7984 S  0.0 13.1  0:00.00 sidekiq 2.7.5 gitlab [0 of 2 busy]
13315 git        20   0 1420M  130M  7984 S  0.0 13.1  0:00.00 sidekiq 2.7.5 gitlab [0 of 2 busy]
13322 git        20   0 1420M  130M  7984 S  0.0 13.1  0:00.00 sidekiq 2.7.5 gitlab [0 of 2 busy]
13328 git        20   0 1420M  130M  7984 S  0.0 13.1  0:01.38 sidekiq 2.7.5 gitlab [0 of 2 busy]
13329 git        20   0 1420M  130M  7984 S  0.0 13.1  0:00.99 sidekiq 2.7.5 gitlab [0 of 2 busy]
13330 git        20   0 1420M  130M  7984 S  0.0 13.1  0:00.00 sidekiq 2.7.5 gitlab [0 of 2 busy]
13331 git        20   0 1420M  130M  7984 S  0.0 13.1  0:00.00 sidekiq 2.7.5 gitlab [0 of 2 busy]
13332 git        20   0 1420M  130M  7984 S  0.0 13.1  0:00.30 sidekiq 2.7.5 gitlab [0 of 2 busy]
13412 git        20   0 1420M  130M  7984 S  0.0 13.1  0:00.28 sidekiq 2.7.5 gitlab [0 of 2 busy]
13304 git        20   0 1420M  130M  7984 S  0.0 13.1  0:08.58 sidekiq 2.7.5 gitlab [0 of 2 busy]
13318 git        20   0 1042M  247M  5940 S  0.0 24.8  0:00.00 unicorn_rails worker[0] -c /home/git/gitlab/config/unicorn.rb -E production
13316 git        20   0 1042M  247M  5940 S  0.0 24.8  0:24.19 unicorn_rails worker[0] -c /home/git/gitlab/config/unicorn.rb -E production
13319 git        20   0 38100  7976  2720 S  0.0  0.8  0:00.02 python2 /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/gitlab-pygments.rb-0.3.2/lib/pygments/mentos.py

David Southard

unread,
Sep 2, 2015, 6:11:51 PM9/2/15
to GitLab
Came across this via google search. Just for future visitors (probably me) its important to note that to configure sidekiq you only need to put a sidekiq.yml file in rails' config directory per this doc 

Alex Elman

unread,
Sep 2, 2015, 7:13:28 PM9/2/15
to gitl...@googlegroups.com
What are the drawbacks of leaving the default at 25 workers?

--
You received this message because you are subscribed to the Google Groups "GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitlabhq+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gitlabhq/75ea0cb8-50cc-410d-ba1e-8b76b65ea6d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alex Elman
Reply all
Reply to author
Forward
0 new messages