]> git.openstreetmap.org Git - chef.git/blobdiff - roles/tilecache.rb
tilecache: enable some caching in nginx
[chef.git] / roles / tilecache.rb
index 645d107d0e57c7706730e0aae1b4e42c7be61587..6a8acf32f074b9018f0628642b34d33964cf4004 100644 (file)
@@ -16,7 +16,13 @@ default_attributes(
     :tcp_fastopen_key => "tile"
   },
   :nginx => {
-    :access_log => false
+    :access_log => false,
+    :cache => {
+      :proxy => {
+        :enable => true,
+        :keys_zone => "proxy_cache_zone:64M",
+      }
+    }
   },
   :sysctl => {
     :sockets => {
@@ -40,7 +46,7 @@ default_attributes(
     :network_local_port_range => {
       :comment => "Increase available local port range",
       :parameters => {
-        "net.ipv4.ip_local_port_range" => "4096 64000"
+        "net.ipv4.ip_local_port_range" => "1024 65000"
       }
     },
     :kernel_tfo_listen_enable => {
@@ -52,7 +58,7 @@ default_attributes(
     :squid_swappiness => {
       :comment => "Prefer not to swapout to free memory",
       :parameters => {
-        "vm.swappiness" => "30"
+        "vm.swappiness" => "1"
       }
     },
     :sched_wakeup => {