summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-05-27 15:11:13 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-05-27 15:11:13 -0300
commitcca02a5cc047ea095e3226fb10dce59b867e2460 (patch)
tree3c0aef303af906a5c2462ec980993478120bd994
parent24944f7ef634fd6182725933d503b01f7ea10afe (diff)
downloadpuppet-database-cca02a5cc047ea095e3226fb10dce59b867e2460.tar.gz
puppet-database-cca02a5cc047ea095e3226fb10dce59b867e2460.tar.bz2
Tuning mysql
-rw-r--r--manifests/init.pp21
1 files changed, 19 insertions, 2 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 31361bf..0f0f571 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -14,9 +14,9 @@ class database {
content => "mysql soft nofile 24000\nmysql hard nofile 32000\n",
}
- # Avoid Errcode: 24
+ # TODO: remove in the future
file { '/etc/mysql/conf.d/mysqld_open_files_limit.cnf':
- ensure => present,
+ ensure => absent,
owner => root,
group => root,
mode => 0644,
@@ -30,4 +30,21 @@ class database {
sqldump => true,
sqldumpoptions => '--lock-tables --complete-insert --add-drop-table --quick --quote-names --single-transaction',
}
+
+ #
+ # Tuning
+ #
+
+ # Avoid Errcode: 24
+ database::config { 'open-files-limit':
+ value => '500000',
+ }
+
+ database::config {
+ 'query_cache_size': value => '32M';
+ 'join_buffer_size': value => '256K';
+ 'tmp_table_size': value => '32M';
+ 'max_heap_table_size': value => '32M';
+ 'innodb_buffer_pool_size': value => '256M';
+ }
}