From 8850c3f85cb5a99e38a28543d95839988a6a550b Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Fri, 9 May 2025 19:08:54 -0400 Subject: [PATCH] postgres: Tune effective_cache_size upwards, to 75%. The previous 10/16ths is an odd value; various suggestions are around 75% of RAM, and in practice this is closer to what is observed. --- puppet/zulip/manifests/profile/postgresql.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/puppet/zulip/manifests/profile/postgresql.pp b/puppet/zulip/manifests/profile/postgresql.pp index f8827fe477..9eeef257ad 100644 --- a/puppet/zulip/manifests/profile/postgresql.pp +++ b/puppet/zulip/manifests/profile/postgresql.pp @@ -12,7 +12,7 @@ class zulip::profile::postgresql { } $work_mem = zulipconf('postgresql', 'work_mem', sprintf('%dMB', $total_postgres_memory_mb / 256)) $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 * 10 / 16)) + $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', $total_postgres_memory_mb / 16)) $wal_buffers = zulipconf('postgresql', 'wal_buffers', undef) $random_page_cost = zulipconf('postgresql', 'random_page_cost', undef)