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
@@ -12,4 +12,3 @@ relay_hostname: relay.spb.cdtc.unb.br | @@ -12,4 +12,3 @@ relay_hostname: relay.spb.cdtc.unb.br | ||
12 | relay_ip: 164.41.9.48 | 12 | relay_ip: 164.41.9.48 |
13 | alt_ssh_port: 55555 | 13 | alt_ssh_port: 55555 |
14 | from_address: noreply@spb.cdtc.unb.br | 14 | from_address: noreply@spb.cdtc.unb.br |
15 | -colab_http_workers: 4 |
config/dev/config.yaml
@@ -16,4 +16,3 @@ alt_ssh_port: 55555 | @@ -16,4 +16,3 @@ alt_ssh_port: 55555 | ||
16 | external_outgoing_mail_domain: serpro.gov.br | 16 | external_outgoing_mail_domain: serpro.gov.br |
17 | raven_dsn: https://a5e2f92a83774dfc9de66486e0fe970b:1a9229a4e1d2483582144d302fb53115@sentry.tracy.com.br/19 | 17 | raven_dsn: https://a5e2f92a83774dfc9de66486e0fe970b:1a9229a4e1d2483582144d302fb53115@sentry.tracy.com.br/19 |
18 | google_analytics_id: 'UA-64206731-2' | 18 | google_analytics_id: 'UA-64206731-2' |
19 | -colab_http_workers: 8 |
config/homologa/config.yaml
@@ -17,4 +17,3 @@ external_outgoing_mail_relay: 189.9.150.53 | @@ -17,4 +17,3 @@ external_outgoing_mail_relay: 189.9.150.53 | ||
17 | external_outgoing_mail_domain: serpro.gov.br | 17 | external_outgoing_mail_domain: serpro.gov.br |
18 | raven_dsn: https://a5e2f92a83774dfc9de66486e0fe970b:1a9229a4e1d2483582144d302fb53115@sentry.tracy.com.br/19 | 18 | raven_dsn: https://a5e2f92a83774dfc9de66486e0fe970b:1a9229a4e1d2483582144d302fb53115@sentry.tracy.com.br/19 |
19 | google_analytics_id: 'UA-64206731-3' | 19 | google_analytics_id: 'UA-64206731-3' |
20 | -colab_http_workers: 8 |
config/lappis/config.yaml
@@ -12,4 +12,4 @@ relay_hostname: relay.softwarepublico.lappis | @@ -12,4 +12,4 @@ relay_hostname: relay.softwarepublico.lappis | ||
12 | relay_ip: 10.0.0.15 | 12 | relay_ip: 10.0.0.15 |
13 | alt_ssh_port: 5555 | 13 | alt_ssh_port: 5555 |
14 | from_address: noreply@softwarepublico.lappis | 14 | from_address: noreply@softwarepublico.lappis |
15 | -colab_http_workers: 4 | 15 | + |
config/local/config.yaml
@@ -13,4 +13,3 @@ relay_ip: 10.10.10.3 | @@ -13,4 +13,3 @@ relay_ip: 10.10.10.3 | ||
13 | alt_ssh_port: 5555 | 13 | alt_ssh_port: 5555 |
14 | from_address: noreply@softwarepublico.dev | 14 | from_address: noreply@softwarepublico.dev |
15 | raven_dsn: https://a5e2f92a83774dfc9de66486e0fe970b:1a9229a4e1d2483582144d302fb53115@sentry.tracy.com.br/19 | 15 | raven_dsn: https://a5e2f92a83774dfc9de66486e0fe970b:1a9229a4e1d2483582144d302fb53115@sentry.tracy.com.br/19 |
16 | -colab_http_workers: 2 |
config/prod/config.yaml
@@ -18,4 +18,3 @@ external_outgoing_mail_domain: serpro.gov.br | @@ -18,4 +18,3 @@ external_outgoing_mail_domain: serpro.gov.br | ||
18 | raven_dsn: https://4418146896924efe9b73d557f803f047:8a59f39b5f584ff589ecf3dd47faaead@sentry.tracy.com.br/13 | 18 | raven_dsn: https://4418146896924efe9b73d557f803f047:8a59f39b5f584ff589ecf3dd47faaead@sentry.tracy.com.br/13 |
19 | google_analytics_id: 'UA-64206731-1' | 19 | google_analytics_id: 'UA-64206731-1' |
20 | munin_master: 10.21.0.10 | 20 | munin_master: 10.21.0.10 |
21 | -colab_http_workers: 16 |
cookbooks/colab/templates/colab.erb
cookbooks/gitlab/files/unicorn.rb
@@ -16,7 +16,7 @@ ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab" | @@ -16,7 +16,7 @@ ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab" | ||
16 | # Read about unicorn workers here: | 16 | # Read about unicorn workers here: |
17 | # http://doc.gitlab.com/ee/install/requirements.html#unicorn-workers | 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 | # Since Unicorn is never exposed to outside clients, it does not need to | 21 | # Since Unicorn is never exposed to outside clients, it does not need to |
22 | # run on the standard HTTP port (80), there is no reason to start Unicorn | 22 | # run on the standard HTTP port (80), there is no reason to start Unicorn |
cookbooks/postgresql/templates/centos/postgresql.conf.erb
1 | listen_addresses = 'localhost,<%= node['peers']['database'] %>' | 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 | logging_collector = on # Enable capturing of stderr and csvlog | 15 | logging_collector = on # Enable capturing of stderr and csvlog |
8 | log_filename = 'postgresql-%a.log' # log file name pattern, | 16 | log_filename = 'postgresql-%a.log' # log file name pattern, |
9 | log_truncate_on_rotation = on # If on, an existing log file with the | 17 | log_truncate_on_rotation = on # If on, an existing log file with the |