From 69aad675cd589bf027f1cee3062e9a22807403eb Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Sun, 3 Nov 2019 23:50:27 +0000 Subject: [PATCH 1/1] tilecache: storage tuning --- cookbooks/nginx/attributes/default.rb | 8 ++++---- cookbooks/nginx/templates/default/nginx.conf.erb | 4 ++-- roles/cherufe.rb | 7 +++++++ roles/jakelong.rb | 7 +++++++ roles/kalessin.rb | 7 +++++++ roles/norbert.rb | 7 +++++++ roles/saphira.rb | 7 +++++++ roles/sarkany.rb | 7 +++++++ roles/simurgh.rb | 7 +++++++ 9 files changed, 55 insertions(+), 6 deletions(-) diff --git a/cookbooks/nginx/attributes/default.rb b/cookbooks/nginx/attributes/default.rb index 44fb5bc10..30eb12bcc 100644 --- a/cookbooks/nginx/attributes/default.rb +++ b/cookbooks/nginx/attributes/default.rb @@ -3,12 +3,12 @@ default[:nginx][:access_log] = "/var/log/nginx/access.log" # Tuning for nginx fastcgi cache zone default[:nginx][:cache][:fastcgi][:enable] = false -default[:nginx][:cache][:fastcgi][:keys_zone] = "fastcgi_cache_zone:32M" +default[:nginx][:cache][:fastcgi][:keys_zone] = "fastcgi_cache_zone:48M" default[:nginx][:cache][:fastcgi][:inactive] = "45d" -default[:nginx][:cache][:fastcgi][:max_size] = "2048M" +default[:nginx][:cache][:fastcgi][:max_size] = "8192M" # Tuning for nginx proxy cache zone default[:nginx][:cache][:proxy][:enable] = false -default[:nginx][:cache][:proxy][:keys_zone] = "proxy_cache_zone:32M" +default[:nginx][:cache][:proxy][:keys_zone] = "proxy_cache_zone:48M" default[:nginx][:cache][:proxy][:inactive] = "45d" -default[:nginx][:cache][:proxy][:max_size] = "2048M" +default[:nginx][:cache][:proxy][:max_size] = "8192M" diff --git a/cookbooks/nginx/templates/default/nginx.conf.erb b/cookbooks/nginx/templates/default/nginx.conf.erb index fc2a462d9..de53cc39d 100644 --- a/cookbooks/nginx/templates/default/nginx.conf.erb +++ b/cookbooks/nginx/templates/default/nginx.conf.erb @@ -25,12 +25,12 @@ http { '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; - access_log <%= node[:nginx][:access_log] %> main buffer=32k flush=1m; + access_log <%= node[:nginx][:access_log] %> main flush=1m; <% else -%> access_log off; <% end -%> - keepalive_timeout 30; + keepalive_timeout 20 20; server_tokens off; diff --git a/roles/cherufe.rb b/roles/cherufe.rb index 2fa0d68e3..30814b8a7 100644 --- a/roles/cherufe.rb +++ b/roles/cherufe.rb @@ -30,6 +30,13 @@ default_attributes( "rock /store/squid/rock-32768 45000 swap-timeout=200 slot-size=32768 min-size=16285 max-size=262144" ] }, + :nginx => { + :cache => { + :proxy => { + :max_size => "4096M" + } + } + }, :tilecache => { :tile_parent => "vinadelmar.render.openstreetmap.org", :tile_siblings => [ diff --git a/roles/jakelong.rb b/roles/jakelong.rb index a2633cd4b..4eff9e02a 100644 --- a/roles/jakelong.rb +++ b/roles/jakelong.rb @@ -26,6 +26,13 @@ default_attributes( :cache_mem => "1024 MB", :cache_dir => "coss /store/squid/coss-01 24000 block-size=8192 max-size=262144 membufs=30" }, + :nginx => { + :cache => { + :proxy => { + :max_size => "2048M" + } + } + }, :sysctl => { :kvm => { :comment => "Tuning for KVM guest", diff --git a/roles/kalessin.rb b/roles/kalessin.rb index 953496dfa..8805233ed 100644 --- a/roles/kalessin.rb +++ b/roles/kalessin.rb @@ -26,6 +26,13 @@ default_attributes( :cache_mem => "12500 MB", :cache_dir => "coss /store/squid/coss-01 128000 block-size=8192 max-size=262144 membufs=80" }, + :nginx => { + :cache => { + :proxy => { + :max_size => "2048M" + } + } + }, :tilecache => { :tile_parent => "germany.render.openstreetmap.org", :tile_siblings => [ diff --git a/roles/norbert.rb b/roles/norbert.rb index 8476393d6..d86bd088c 100644 --- a/roles/norbert.rb +++ b/roles/norbert.rb @@ -26,6 +26,13 @@ default_attributes( :cache_mem => "7500 MB", :cache_dir => "coss /store/squid/coss-01 80000 block-size=8192 max-size=262144 membufs=80" }, + :nginx => { + :cache => { + :proxy => { + :max_size => "2048M" + } + } + }, :tilecache => { :tile_parent => "france.render.openstreetmap.org", :tile_siblings => [ diff --git a/roles/saphira.rb b/roles/saphira.rb index ebfbc3126..7f75a78f6 100644 --- a/roles/saphira.rb +++ b/roles/saphira.rb @@ -35,6 +35,13 @@ default_attributes( "rock /store/squid/rock-32768 22800 swap-timeout=200 slot-size=32768 min-size=16285 max-size=262144" ] }, + :nginx => { + :cache => { + :proxy => { + :max_size => "4096M" + } + } + }, :tilecache => { :tile_parent => "london.render.openstreetmap.org", :tile_siblings => [ diff --git a/roles/sarkany.rb b/roles/sarkany.rb index ce318fcf3..c6ed70757 100644 --- a/roles/sarkany.rb +++ b/roles/sarkany.rb @@ -26,6 +26,13 @@ default_attributes( :cache_mem => "5100 MB", :cache_dir => "coss /store/squid/coss-01 80000 block-size=8192 max-size=262144 membufs=80" }, + :nginx => { + :cache => { + :proxy => { + :max_size => "4096M" + } + } + }, :tilecache => { :tile_parent => "budapest.render.openstreetmap.org", :tile_siblings => [ diff --git a/roles/simurgh.rb b/roles/simurgh.rb index 6fc87575e..3be91b44e 100644 --- a/roles/simurgh.rb +++ b/roles/simurgh.rb @@ -18,6 +18,13 @@ default_attributes( :cache_mem => "6400 MB", :cache_dir => "coss /store/squid/coss-01 128000 block-size=8192 max-size=262144 membufs=80" }, + :nginx => { + :cache => { + :proxy => { + :max_size => "2048M" + } + } + }, :tilecache => { :tile_parent => "baku.render.openstreetmap.org", :tile_siblings => [ -- 2.43.2