Skip to content
Snippets Groups Projects

Gitlab::Redis bigger connection pool on sidekiq workers

What does this MR do?

This MR configure Gitlab::Redis to use a pool with a size related with the number of threads running the current process.

Are there points in the code the reviewer needs to double check?

Are there any race condition setting the pool class instance variable?

Why was this MR needed?

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Relates #18663 (moved)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Reassigned to @pacoguzman

  • Paco Guzman Added 1 commit:

    Added 1 commit:

    • 0c414ab9 - Use higher size on Gitlab::Redis connection pool on Sidekiq servers
  • Paco Guzman Changed title: {-Resolve "post-receive job is too slow when pushing a rebased branch"-}Gitlab::Redis bigger connection pool on sidekiq workers

    Changed title: {-Resolve "post-receive job is too slow when pushing a rebased branch"-}Gitlab::Redis bigger connection pool on sidekiq workers

  • Paco Guzman Added 3 commits:

    Added 3 commits:

  • Paco Guzman Added 64 commits:

    Added 64 commits:

  • 24 24 end
    25 25
    26 26 def with
    27 @pool ||= ConnectionPool.new { ::Redis.new(params) }
    27 @pool ||= ConnectionPool.new(size: (Sidekiq.server? ? (Sidekiq.options[:concurrency] + 5) : 5)) { ::Redis.new(params) }
  • Are there any race condition setting the pool class instance variable?

    No, we have a Rails initializer that forces the ConnectionPool instance to be created, and Rails initializers execute in a single thread.

  • Paco Guzman Added 1 commit:

    Added 1 commit:

    • ca53fcf9 - Use higher size on Gitlab::Redis connection pool on Sidekiq servers
  • 88 88 end
    89 89 end
    90 90
    91 describe '._with' do
  • Paco Guzman Added 218 commits:

    Added 218 commits:

  • Paco Guzman Added 1 commit:

    Added 1 commit:

    • 1df68070 - Use higher size on Gitlab::Redis connection pool on Sidekiq servers
  • Paco Guzman Added 12 commits:

    Added 12 commits:

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading