From c276a3a197cfe8a2e606c0b0eb606f5afeaae132 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 19 Sep 2016 09:19:53 +0100 Subject: [PATCH] Set effective_io_concurrency to 256 on karm --- cookbooks/postgresql/attributes/default.rb | 1 + cookbooks/postgresql/templates/default/postgresql.conf.erb | 4 ++++ roles/karm.rb | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cookbooks/postgresql/attributes/default.rb b/cookbooks/postgresql/attributes/default.rb index 6a5d68641..5829b9fe3 100644 --- a/cookbooks/postgresql/attributes/default.rb +++ b/cookbooks/postgresql/attributes/default.rb @@ -7,6 +7,7 @@ default[:postgresql][:settings][:defaults][:temp_buffers] = "8MB" default[:postgresql][:settings][:defaults][:work_mem] = "1MB" default[:postgresql][:settings][:defaults][:maintenance_work_mem] = "16MB" default[:postgresql][:settings][:defaults][:max_stack_depth] = "2MB" +default[:postgresql][:settings][:defaults][:effective_io_concurrency] = "1" default[:postgresql][:settings][:defaults][:wal_level] = "minimal" default[:postgresql][:settings][:defaults][:fsync] = "on" default[:postgresql][:settings][:defaults][:synchronous_commit] = "on" diff --git a/cookbooks/postgresql/templates/default/postgresql.conf.erb b/cookbooks/postgresql/templates/default/postgresql.conf.erb index 4bfe74fa8..926ecef82 100644 --- a/cookbooks/postgresql/templates/default/postgresql.conf.erb +++ b/cookbooks/postgresql/templates/default/postgresql.conf.erb @@ -43,6 +43,10 @@ work_mem = <%= @settings[:work_mem] || @defaults[:work_mem] %> maintenance_work_mem = <%= @settings[:maintenance_work_mem] || @defaults[:maintenance_work_mem] %> max_stack_depth = <%= @settings[:max_stack_depth] || @defaults[:max_stack_depth] %> +# - Asynchronous Behavior - + +effective_io_concurrency = <%= @settings[:effective_io_concurrency] || @defaults[:effective_io_concurrency] %> + #------------------------------------------------------------------------------ # WRITE AHEAD LOG #------------------------------------------------------------------------------ diff --git a/roles/karm.rb b/roles/karm.rb index d9e604a52..e9ba46a38 100644 --- a/roles/karm.rb +++ b/roles/karm.rb @@ -25,7 +25,8 @@ default_attributes( :shared_buffers => "64GB", :work_mem => "64MB", :maintenance_work_mem => "1GB", - :effective_cache_size => "180GB" + :effective_cache_size => "180GB", + :effective_io_concurrency => "256" } }, :versions => ["9.5"] -- 2.39.5