]> git.openstreetmap.org Git - chef.git/blob - roles/vectortile.rb
foundation: use default mediawiki version
[chef.git] / roles / vectortile.rb
1 name "vectortile"
2 description "Role applied to all vector tile servers"
3
4 default_attributes(
5   :accounts => {
6     :users => {
7       :pnorman => { :status => :administrator }
8     }
9   },
10   :postgresql => {
11     :settings => {
12       :defaults => {
13         :shared_buffers => "16GB",
14         :work_mem => "128MB",
15         :maintenance_work_mem => "8GB",
16         :max_parallel_workers_per_gather => "0",
17         :wal_level => "minimal",
18         :wal_buffers => "1024kB",
19         :wal_writer_delay => "500ms",
20         :checkpoint_timeout => "60min",
21         :commit_delay => "10000",
22         :max_wal_size => "10GB",
23         :max_wal_senders => "0",
24         :jit => "off",
25         :track_activity_query_size => "16384",
26         :autovacuum_vacuum_scale_factor => "0.05",
27         :autovacuum_analyze_scale_factor => "0.02"
28       }
29     }
30   },
31   :sysctl => {
32     :sockets => {
33       :comment => "Increase size of connection queue",
34       :parameters => {
35         "net.core.somaxconn" => 10000
36       }
37     },
38     :network_conntrack_time_wait => {
39       :comment => "Only track completed connections for 30 seconds",
40       :parameters => {
41         "net.netfilter.nf_conntrack_tcp_timeout_time_wait" => "30"
42       }
43     },
44     :network_conntrack_max => {
45       :comment => "Increase max number of connections tracked",
46       :parameters => {
47         "net.netfilter.nf_conntrack_max" => "524288"
48       }
49     },
50     :no_tcp_slow_start => {
51       :comment => "Disable TCP slow start",
52       :parameters => {
53         "net.ipv4.tcp_slow_start_after_idle" => "0"
54       }
55     },
56     :tcp_use_bbr => {
57       :comment => "Use TCP BBR Congestion Control",
58       :parameters => {
59         "net.core.default_qdisc" => "fq",
60         "net.ipv4.tcp_congestion_control" => "bbr"
61       }
62     }
63   }
64 )
65
66 run_list(
67   "recipe[vectortile]"
68 )