Commit 2a60cecf12aea3d47dc3385b28f6d6930e2f09fb

Authored by Antonio Terceiro
2 parents 07e70955 344faa3e
Exists in master and in 83 other branches 3.x, add_sisp_to_chef, add_super_archives_plugin, api_for_colab, automates_core_packing, backup_not_prod, changes_in_buttons_on_content_panel, colab_automated_login, colab_spb_plugin_recipe, colab_widgets_settings, design_validation, dev_env_minimal, disable_email_dev, fix_breadcrumbs_position, fix_categories_software_link, fix_edit_institution, fix_edit_software_with_another_license, fix_get_license_info, fix_gitlab_assets_permission, fix_list_style_inside_article, fix_list_style_on_folder_elements, fix_members_pagination, fix_merge_request_url, fix_models_translations, fix_no_license, fix_software_api, fix_software_block_migration, fix_software_communities_translations, fix_software_communities_unit_test, fix_style_create_institution_admin_panel, fix_superarchives_imports, fix_sym_links_noosfero, focus_search_field_theme, gov-user-refactoring, gov-user-refactoring-rails4, header_fix, institution_modal_on_rating, kalibro-conf-refactoring, kalibro-processor-package, lxc_settings, margin_fix, mezuro_cookbook, prezento, r3, refactor_download_block, refactor_software_communities, refactor_software_for_sisp, register_page, release-process, release-process-v2, remove-unused-images, remove_broken_theme, remove_secondary_email_from_user, remove_sisp_buttons, removing_super_archives_email, review_message, scope2method, signals_user_noosfero, sisp_catalog_header, sisp_colab_config, sisp_dev, sisp_dev_master, sisp_simple_version, software_as_organization, software_catalog_style_fix, software_communities_html_refactor, software_infos_api, spb_minimal_env, spb_to_rails4, spec_refactor, stable-4.1, stable-4.2, stable-4.x, stable-devel, syslog, temp_soft_comm_refactoring, theme_header, theme_javascript_refactory, thread_dropdown, thread_page, update_search_by_categories, update_software_api, update_softwares_boxes

Merge branch 'performance'

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
1 -WEB_CONCURRENCY=<%= node['config']['colab_http_workers'] %> 1 +WEB_CONCURRENCY=<%= `nproc`.to_i * 2 %>
cookbooks/gitlab/files/unicorn.rb
@@ -16,7 +16,7 @@ ENV[&#39;RAILS_RELATIVE_URL_ROOT&#39;] = &quot;/gitlab&quot; @@ -16,7 +16,7 @@ ENV[&#39;RAILS_RELATIVE_URL_ROOT&#39;] = &quot;/gitlab&quot;
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