Commit 2a60cecf12aea3d47dc3385b28f6d6930e2f09fb
Exists in
master
and in
83 other branches
Merge branch 'performance'
Showing
9 changed files
with
14 additions
and
11 deletions
Show diff stats
config/cdtc/config.yaml
config/dev/config.yaml
config/homologa/config.yaml
... | ... | @@ -17,4 +17,3 @@ external_outgoing_mail_relay: 189.9.150.53 |
17 | 17 | external_outgoing_mail_domain: serpro.gov.br |
18 | 18 | raven_dsn: https://a5e2f92a83774dfc9de66486e0fe970b:1a9229a4e1d2483582144d302fb53115@sentry.tracy.com.br/19 |
19 | 19 | google_analytics_id: 'UA-64206731-3' |
20 | -colab_http_workers: 8 | ... | ... |
config/lappis/config.yaml
config/local/config.yaml
config/prod/config.yaml
cookbooks/colab/templates/colab.erb
cookbooks/gitlab/files/unicorn.rb
... | ... | @@ -16,7 +16,7 @@ ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab" |
16 | 16 | # Read about unicorn workers here: |
17 | 17 | # http://doc.gitlab.com/ee/install/requirements.html#unicorn-workers |
18 | 18 | # |
19 | -worker_processes 2 | |
19 | +worker_processes `nproc`.to_i | |
20 | 20 | |
21 | 21 | # Since Unicorn is never exposed to outside clients, it does not need to |
22 | 22 | # run on the standard HTTP port (80), there is no reason to start Unicorn | ... | ... |
cookbooks/postgresql/templates/centos/postgresql.conf.erb
1 | 1 | listen_addresses = 'localhost,<%= node['peers']['database'] %>' |
2 | 2 | |
3 | -# TODO optimize these settings | |
3 | +<% ram = `awk '{ if ($1 == "MemTotal:") {print($2) } }' /proc/meminfo`.to_i %> | |
4 | 4 | |
5 | -max_connections = 100 # (change requires restart) | |
6 | -shared_buffers = 32MB # min 128kB | |
5 | +####################################################################### | |
6 | +# performance optimization settings | |
7 | +####################################################################### | |
8 | +shared_buffers = <%= (0.1 * ram).to_i %>kB # 10% of RAM for shared buffers | |
9 | +effective_cache_size = <%= (0.8 * ram).to_i %>kB # 80% of RAM for cache | |
10 | + | |
11 | +####################################################################### | |
12 | +# other settings | |
13 | +####################################################################### | |
14 | +max_connections = 500 # (change requires restart) | |
7 | 15 | logging_collector = on # Enable capturing of stderr and csvlog |
8 | 16 | log_filename = 'postgresql-%a.log' # log file name pattern, |
9 | 17 | log_truncate_on_rotation = on # If on, an existing log file with the | ... | ... |