]> git.openstreetmap.org Git - chef.git/commitdiff
Tune mysql for piwik
authorTom Hughes <tom@compton.nu>
Mon, 16 Mar 2015 10:25:29 +0000 (10:25 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 16 Mar 2015 10:25:29 +0000 (10:25 +0000)
cookbooks/mysql/attributes/default.rb
cookbooks/mysql/templates/default/my.cnf.erb
roles/piwik.rb

index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..26ccd036840386d49cd168317d9c9641ef5893ec 100644 (file)
@@ -0,0 +1 @@
+default[:mysql][:settings] = {}
index a03aebc8dbba3e4e74340bbdfbcf5ad54daa80ed..7e445fa926140b0757696939a3f0f358319e5b77 100644 (file)
@@ -1 +1,8 @@
 # DO NOT EDIT - This file is being maintained by Chef
 # DO NOT EDIT - This file is being maintained by Chef
+<% node[:mysql][:settings].each do |section,settings| -%>
+
+[<%= section %>]
+<% settings.each do |name, value| -%>
+<%= name %> = <%= value %>
+<% end -%>
+<% end -%>
index b15472dc8fd09eca9010147698775627bdedf1b2..a2badbc1ae8a291f21bd673936ef41dcab07b3c9 100644 (file)
@@ -4,6 +4,15 @@ description "Role applied to all Piwik servers"
 default_attributes(
   :apache => {
     :mpm => "prefork"
 default_attributes(
   :apache => {
     :mpm => "prefork"
+  },
+  :mysql => {
+    :settings => {
+      :mysqld => {
+        :innodb_buffer_pool_instances => "8",
+        :innodb_buffer_pool_size => "16GB",
+        :innodb_flush_log_at_trx_commit => "2"
+      }
+    }
   }
 )
 
   }
 )