mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 16:43:57 +00:00
postgres: Add knobs for parallelism control.
This commit is contained in:
committed by
Tim Abbott
parent
933871e825
commit
b4c8d2e6f5
@@ -14,6 +14,12 @@ class zulip::profile::postgresql {
|
|||||||
$shared_buffers = zulipconf('postgresql', 'shared_buffers', sprintf('%dMB', $total_postgres_memory_mb / 4))
|
$shared_buffers = zulipconf('postgresql', 'shared_buffers', sprintf('%dMB', $total_postgres_memory_mb / 4))
|
||||||
$effective_cache_size = zulipconf('postgresql', 'effective_cache_size', sprintf('%dMB', $total_postgres_memory_mb * 3 / 4))
|
$effective_cache_size = zulipconf('postgresql', 'effective_cache_size', sprintf('%dMB', $total_postgres_memory_mb * 3 / 4))
|
||||||
$maintenance_work_mem = zulipconf('postgresql', 'maintenance_work_mem', sprintf('%dMB', min(2048, $total_postgres_memory_mb / 8)))
|
$maintenance_work_mem = zulipconf('postgresql', 'maintenance_work_mem', sprintf('%dMB', min(2048, $total_postgres_memory_mb / 8)))
|
||||||
|
|
||||||
|
$max_worker_processes = zulipconf('postgresql', 'max_worker_processes', undef)
|
||||||
|
$max_parallel_workers_per_gather = zulipconf('postgresql', 'max_parallel_workers_per_gather', undef)
|
||||||
|
$max_parallel_workers = zulipconf('postgresql', 'max_parallel_workers', undef)
|
||||||
|
$max_parallel_maintenance_workers = zulipconf('postgresql', 'max_parallel_maintenance_workers', undef)
|
||||||
|
|
||||||
$wal_buffers = zulipconf('postgresql', 'wal_buffers', undef)
|
$wal_buffers = zulipconf('postgresql', 'wal_buffers', undef)
|
||||||
$random_page_cost = zulipconf('postgresql', 'random_page_cost', undef)
|
$random_page_cost = zulipconf('postgresql', 'random_page_cost', undef)
|
||||||
$effective_io_concurrency = zulipconf('postgresql', 'effective_io_concurrency', undef)
|
$effective_io_concurrency = zulipconf('postgresql', 'effective_io_concurrency', undef)
|
||||||
|
|||||||
@@ -835,6 +835,18 @@ random_page_cost = <%= @random_page_cost %>
|
|||||||
<% unless @effective_io_concurrency.nil? -%>
|
<% unless @effective_io_concurrency.nil? -%>
|
||||||
effective_io_concurrency = <%= @effective_io_concurrency %>
|
effective_io_concurrency = <%= @effective_io_concurrency %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<% unless @max_worker_processes.nil? -%>
|
||||||
|
max_worker_processes = <%= @max_worker_processes %>
|
||||||
|
<% end -%>
|
||||||
|
<% unless @max_parallel_workers_per_gather.nil? -%>
|
||||||
|
max_parallel_workers_per_gather = <%= @max_parallel_workers_per_gather %>
|
||||||
|
<% end -%>
|
||||||
|
<% unless @max_parallel_workers.nil? -%>
|
||||||
|
max_parallel_workers = <%= @max_parallel_workers %>
|
||||||
|
<% end -%>
|
||||||
|
<% unless @max_parallel_maintenance_workers.nil? -%>
|
||||||
|
max_parallel_maintenance_workers = <%= @max_parallel_maintenance_workers %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
<% unless @listen_addresses.nil? -%>
|
<% unless @listen_addresses.nil? -%>
|
||||||
listen_addresses = <%= @listen_addresses %>
|
listen_addresses = <%= @listen_addresses %>
|
||||||
|
|||||||
@@ -39,6 +39,18 @@ random_page_cost = <%= @random_page_cost %>
|
|||||||
<% unless @effective_io_concurrency.nil? -%>
|
<% unless @effective_io_concurrency.nil? -%>
|
||||||
effective_io_concurrency = <%= @effective_io_concurrency %>
|
effective_io_concurrency = <%= @effective_io_concurrency %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<% unless @max_worker_processes.nil? -%>
|
||||||
|
max_worker_processes = <%= @max_worker_processes %>
|
||||||
|
<% end -%>
|
||||||
|
<% unless @max_parallel_workers_per_gather.nil? -%>
|
||||||
|
max_parallel_workers_per_gather = <%= @max_parallel_workers_per_gather %>
|
||||||
|
<% end -%>
|
||||||
|
<% unless @max_parallel_workers.nil? -%>
|
||||||
|
max_parallel_workers = <%= @max_parallel_workers %>
|
||||||
|
<% end -%>
|
||||||
|
<% unless @max_parallel_maintenance_workers.nil? -%>
|
||||||
|
max_parallel_maintenance_workers = <%= @max_parallel_maintenance_workers %>
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
<% if @s3_backups_bucket != '' -%>
|
<% if @s3_backups_bucket != '' -%>
|
||||||
# WAL backups to S3 (may also be used for replication)
|
# WAL backups to S3 (may also be used for replication)
|
||||||
|
|||||||
Reference in New Issue
Block a user