From b7d4184f24000fcdee7ca48fd802e35ac03abb67 Mon Sep 17 00:00:00 2001 From: Job van der Voort Date: Mon, 8 Dec 2014 13:51:27 +0100 Subject: advise about unicorn workers --- config/unicorn.rb.example | 16 +++++++++------- doc/install/requirements.md | 10 +++++++++- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/config/unicorn.rb.example b/config/unicorn.rb.example index ea22744fd90..f8f441b1d42 100644 --- a/config/unicorn.rb.example +++ b/config/unicorn.rb.example @@ -13,9 +13,11 @@ # # ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab" -# Use at least one worker per core if you're on a dedicated server, -# more will usually help for _short_ waits on databases/caches. -# The minimum is 2 +# We recommend using CPU cores + 1 worker processes. +# Read more about unicorn workers here: +# http://doc.gitlab.com/ee/install/requirements.html +# +# The minimum amount of worker processes is 2 worker_processes 2 # Since Unicorn is never exposed to outside clients, it does not need to @@ -37,10 +39,10 @@ listen "127.0.0.1:8080", :tcp_nopush => true # nuke workers after 30 seconds instead of 60 seconds (the default) # -# NOTICE: git push over http depends on this value. -# If you want be able to push huge amount of data to git repository over http -# you will have to increase this value too. -# +# NOTICE: git push over http depends on this value. +# If you want be able to push huge amount of data to git repository over http +# you will have to increase this value too. +# # Example of output if you try to push 1GB repo to GitLab over http. # -> git push http://gitlab.... master # diff --git a/doc/install/requirements.md b/doc/install/requirements.md index 660c1adb802..af7ac6146ad 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -88,10 +88,18 @@ Sidekiq processes the background jobs with a multithreaded process. This process starts with the entire Rails stack (200MB+) but it can grow over time due to memory leaks. On a very active server (10,000 active users) the Sidekiq process can use 1GB+ of memory. +## Unicorn Workers + +It's possible to increase the amount of unicorn workers. +This will usually help for short waits on databases and caches. + +We recommend using CPU cores + 1 unicorn workers. +For a machine with 2 cores, 3 unicorn workers is ideal. + ## Supported web browsers - Chrome (Latest stable version) -- Firefox (Latest released version and [latest ESR version](https://www.mozilla.org/en-US/firefox/organizations/)) +- Firefox (Latest released version and [latest ESR version](https://www.mozilla.org/en-US/firefox/organizations/)) - Safari 7+ (known problem: required fields in html5 do not work) - Opera (Latest released version) - IE 10+ -- cgit v1.2.1 From f811b695f8c9d7019b5e9f33aae962163e8c0020 Mon Sep 17 00:00:00 2001 From: Job van der Voort Date: Mon, 8 Dec 2014 14:21:17 +0100 Subject: memory constrained unicorn workers --- config/unicorn.rb.example | 6 ++---- doc/install/requirements.md | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/unicorn.rb.example b/config/unicorn.rb.example index f8f441b1d42..d8b4f5c7c32 100644 --- a/config/unicorn.rb.example +++ b/config/unicorn.rb.example @@ -13,11 +13,9 @@ # # ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab" -# We recommend using CPU cores + 1 worker processes. -# Read more about unicorn workers here: -# http://doc.gitlab.com/ee/install/requirements.html +# Read about unicorn workers here: +# http://doc.gitlab.com/ee/install/requirements.html#unicorn-workers # -# The minimum amount of worker processes is 2 worker_processes 2 # Since Unicorn is never exposed to outside clients, it does not need to diff --git a/doc/install/requirements.md b/doc/install/requirements.md index af7ac6146ad..28e1fa34d23 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -93,9 +93,11 @@ On a very active server (10,000 active users) the Sidekiq process can use 1GB+ o It's possible to increase the amount of unicorn workers. This will usually help for short waits on databases and caches. -We recommend using CPU cores + 1 unicorn workers. +For most instances we recommend using CPU cores + 1 unicorn workers. For a machine with 2 cores, 3 unicorn workers is ideal. +For memory constrained instances, we recommend using a single unicorn worker. + ## Supported web browsers - Chrome (Latest stable version) -- cgit v1.2.1