Jcrespo has submitted this change and it was merged.
Change subject: Update of parsercache db servers to MariaDB 10 (#1)
......................................................................
Update of parsercache db servers to MariaDB 10 (#1)
Adding pc1001 to be upgraded during maintenance
References T100301
Change-Id: I62a63a04194e5d975f8e8f00b879e33a5a817055
---
M manifests/role/mariadb.pp
M manifests/site.pp
A templates/mariadb/parsercache.my.cnf.erb
3 files changed, 136 insertions(+), 1 deletion(-)
Approvals:
Jcrespo: Looks good to me, approved
jenkins-bot: Verified
diff --git a/manifests/role/mariadb.pp b/manifests/role/mariadb.pp
index c2f27cd..aa32554 100644
--- a/manifests/role/mariadb.pp
+++ b/manifests/role/mariadb.pp
@@ -598,3 +598,33 @@
content => template('mariadb/haproxy-slaves.cfg.erb'),
}
}
+
+class role::mariadb::parsercache {
+
+ include standard
+ include role::mariadb::grants
+ include role::mariadb::grants::core
+ include role::mariadb::monitor
+ include passwords::misc::scripts
+
+ system::role { 'role::mariadb::parsercache':
+ description => 'Parser Cache DB Server',
+ }
+
+ class { 'mariadb::packages_wmf':
+ mariadb10 => true,
+ }
+
+ class { 'mariadb::config':
+ prompt => 'PARSERCACHE',
+ config => 'mariadb/parsercache.my.cnf.erb',
+ password => $passwords::misc::scripts::mysql_root_pass,
+ datadir => '/a/sqldata-cache',
+ tmpdir => '/tmp',
+ }
+
+ # mysql monitoring access from tendril (db1011)
+ ferm::rule { 'mysql_tendril':
+ rule => 'saddr 10.64.0.15 proto tcp dport (3306) ACCEPT;',
+ }
+}
diff --git a/manifests/site.pp b/manifests/site.pp
index 3db44d5..416e953 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2074,7 +2074,13 @@
include role::pybal_config
}
-node /pc100[1-3]\.eqiad\.wmnet/ {
+# parser cache update to MariaDB 10
+node /pc100[1]\.eqiad\.wmnet/ {
+ $cluster = 'mysql'
+ include role::mariadb::parsercache
+}
+
+node /pc100[2-3]\.eqiad\.wmnet/ {
$cluster = 'mysql'
include role::db::core
include mysql_wmf::mysqluser
diff --git a/templates/mariadb/parsercache.my.cnf.erb
b/templates/mariadb/parsercache.my.cnf.erb
new file mode 100644
index 0000000..19a4079
--- /dev/null
+++ b/templates/mariadb/parsercache.my.cnf.erb
@@ -0,0 +1,99 @@
+# Parsercache (based on production)
+# Main changes are reduced durability and p_s
+
+[client]
+port = 3306
+socket = /tmp/mysql.sock
+
+[mysqld]
+
+user = mysql
+socket = /tmp/mysql.sock
+port = 3306
+extra_port = 3307
+datadir = <%= @datadir %>
+tmpdir = <%= @tmpdir %>
+server_id = <%= @server_id %>
+
+# Always start in read_only mode.
+# Master selection will be handled by cluster control.
+read_only = on
+
+log_bin
+log_slave_updates
+skip-external-locking
+skip-name-resolve
+temp-pool
+
+thread_handling = pool-of-threads
+thread_pool_stall_limit = 100
+thread_pool_size = 32
+max_connections = 5000
+back_log = 500
+extra_max_connections = 10
+max_connect_errors = 1000000000
+max_allowed_packet = 16M
+connect_timeout = 3
+query_cache_size = 0
+query_cache_type = 0
+event_scheduler = 1
+userstat = 1
+
+# we are testing impact of performance schema
+performance_schema = 1
+
+log-warnings = 0
+thread_stack = 192K
+thread_cache_size = 300
+interactive_timeout = 28800
+wait_timeout = 3600
+transaction-isolation = REPEATABLE-READ
+use_stat_tables = preferably
+
+# do not sync binlog, allow group commit
+sync_binlog = 0
+binlog_cache_size = 1M
+max_binlog_size = 1000M
+binlog_format = MIXED
+expire_logs_days = 1
+slave_transaction_retries = 4294967295
+sql-mode = IGNORE_BAD_TABLE_OPTIONS
+tmp_table_size = 64M
+max_heap_table_size = 64M
+
+table_open_cache = 50000
+table_definition_cache = 40000
+open-files-limit = 200000
+character_set_server = binary
+character_set_filesystem = binary
+collation_server = binary
+
+default-storage-engine = InnoDB
+# disable file-per-table to avoid multiple small objects
+innodb_file_per_table = 0
+innodb_buffer_pool_size = <%= (Float(@memorysize.split[0]) *
0.75).round %>G
+innodb_log_file_size = 2G
+# reduce durability - this is a cache server
+innodb_flush_log_at_trx_commit = 0
+innodb_flush_method = O_DIRECT
+innodb_thread_concurrency = 0
+innodb_io_capacity = 20000
+innodb_read_io_threads = 16
+innodb_write_io_threads = 8
+innodb_stats_sample_pages = 16
+innodb_stats_method = nulls_unequal
+aria_pagecache_buffer_size = 1G
+join_cache_level = 8
+
+# Until kernel 3.16 http://www.spinics.net/lists/stable/msg61873.html
+# At least, I think so. For now we need to avoid the an assertion failure on
Trusty w/ 3.13
+innodb_use_native_aio = 0
+
+optimizer_switch =
'mrr=on,mrr_cost_based=on,mrr_sort_keys=on,optimize_join_buffer_size=on'
+
+[mysqldump]
+
+quick
+max_allowed_packet = 16M
+
+#!includedir /etc/mysql/conf.d/
--
To view, visit https://gerrit.wikimedia.org/r/213784
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I62a63a04194e5d975f8e8f00b879e33a5a817055
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jcrespo <[email protected]>
Gerrit-Reviewer: Jcrespo <[email protected]>
Gerrit-Reviewer: Springle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits