summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2016-11-07 15:44:55 -0600
committerPatricio Cano <suprnova32@gmail.com>2016-11-10 11:38:11 -0600
commit1d3ada80ad6cb9a4927512fdf4018907bf3098a6 (patch)
tree10f8506d5b4037028d2caf22b26c4ee96e91610e
parentb95216aabadb336e4ed8cdc01f69e873f47f10d0 (diff)
downloadgitlab-ce-1d3ada80ad6cb9a4927512fdf4018907bf3098a6.tar.gz
Added documentation and CHANGELOG item.
-rw-r--r--changelogs/unreleased/sidekiq-job-throttling.yml4
-rw-r--r--doc/administration/operations.md1
-rw-r--r--doc/administration/operations/img/sidekiq_job_throttling.pngbin0 -> 114784 bytes
-rw-r--r--doc/administration/operations/sidekiq_job_throttling.md32
4 files changed, 37 insertions, 0 deletions
diff --git a/changelogs/unreleased/sidekiq-job-throttling.yml b/changelogs/unreleased/sidekiq-job-throttling.yml
new file mode 100644
index 00000000000..1f3aad7ae96
--- /dev/null
+++ b/changelogs/unreleased/sidekiq-job-throttling.yml
@@ -0,0 +1,4 @@
+---
+title: Added ability to throttle Sidekiq Jobs
+merge_request: 7292
+author: Patricio Cano
diff --git a/doc/administration/operations.md b/doc/administration/operations.md
index 4b582d16b64..0daceb98d99 100644
--- a/doc/administration/operations.md
+++ b/doc/administration/operations.md
@@ -1,6 +1,7 @@
# GitLab operations
- [Sidekiq MemoryKiller](operations/sidekiq_memory_killer.md)
+- [Sidekiq Job throttling](operations/sidekiq_job_throttling.md)
- [Cleaning up Redis sessions](operations/cleaning_up_redis_sessions.md)
- [Understanding Unicorn and unicorn-worker-killer](operations/unicorn.md)
- [Moving repositories to a new location](operations/moving_repositories.md)
diff --git a/doc/administration/operations/img/sidekiq_job_throttling.png b/doc/administration/operations/img/sidekiq_job_throttling.png
new file mode 100644
index 00000000000..7f29a4d3c46
--- /dev/null
+++ b/doc/administration/operations/img/sidekiq_job_throttling.png
Binary files differ
diff --git a/doc/administration/operations/sidekiq_job_throttling.md b/doc/administration/operations/sidekiq_job_throttling.md
new file mode 100644
index 00000000000..33cedee7ebd
--- /dev/null
+++ b/doc/administration/operations/sidekiq_job_throttling.md
@@ -0,0 +1,32 @@
+# Sidekiq Job throttling
+
+> Note: Introduced with GitLab 8.14
+
+When your GitLab installation needs to handle tens of thousands of background
+jobs, it can be convenient to prioritize queues that need to be executed
+immediately, e.g. user initiated actions like merging a Merge Request.
+
+In order to accomplish this, you can limit the amount of workers that certain
+slow running queues get can have available. This is what we call Sidekiq Job
+Throttling. Depending on your infrastructure, you might have different slow
+running queues, which is why you can choose which queues to throttle and by
+how much you want to throttle them.
+
+These settings are available in the Application Settings of your GitLab
+installation.
+
+![Sidekiq Job Throttling](img/sidekiq_job_throttling.png)
+
+The throttle factor determines the maximum number of workers a queue can run on.
+This value gets multiplied by `:concurrency` value set in the Sidekiq settings
+and rounded up to the closest full integer.
+
+So, for example, you set the `:concurrency` to 25 and the `Throttling factor` to
+0.1, the maximum workers assigned to the selected queues would be 3.
+
+```
+limit = (factor * Sidekiq.options[:concurrency]).ceil
+```
+
+After enabling the job throttling, you will need to restart your GitLab
+instance, in order for the changes to take effect. \ No newline at end of file