Jcrespo has submitted this change and it was merged.

Change subject: Enable performance_schema on db1065 (and user_stats = 0)
......................................................................


Enable performance_schema on db1065 (and user_stats = 0)

Also disable user_stats if performance_schema is enabled.

Change-Id: I33f0e137d434443863e8dfcb925ceff78c4714b6
References: T116557 T99485
---
M manifests/site.pp
M templates/mariadb/production.my.cnf.erb
2 files changed, 28 insertions(+), 17 deletions(-)

Approvals:
  Jcrespo: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/site.pp b/manifests/site.pp
index 8bea68c..edeb3e8 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -545,12 +545,19 @@
 
 # MariaDB 10
 
-node /^db10(51|53|55|57|65|66|72|73)\.eqiad\.wmnet/ {
+node /^db10(51|53|55|57|66|72|73)\.eqiad\.wmnet/ {
     class { 'role::mariadb::core':
         shard => 's1',
     }
 }
 
+node /^db1065\.eqiad\.wmnet/ {
+    class { 'role::mariadb::core':
+        shard => 's1',
+        p_s   => 'on',
+    }
+}
+
 node /^db20(16|34|42|48)\.codfw\.wmnet/ {
 
     $cluster = 'mysql'
diff --git a/templates/mariadb/production.my.cnf.erb 
b/templates/mariadb/production.my.cnf.erb
index 43b207f..2eb66ce 100644
--- a/templates/mariadb/production.my.cnf.erb
+++ b/templates/mariadb/production.my.cnf.erb
@@ -1,3 +1,4 @@
+# Warning: This file is managed by Puppet!
 # Production
 
 [client]
@@ -36,7 +37,6 @@
 query_cache_size               = 0
 query_cache_type               = 0
 event_scheduler                = 1
-userstat                       = 1
 log-warnings                   = 0
 thread_stack                   = 192K
 thread_cache_size              = 300
@@ -89,23 +89,27 @@
 
 <% if @p_s == 'on' %>
 # Enabling performance_schema (disabled by default in MariaDB10)
-performance_schema = 1
+performance_schema                                     = 1
 # downsizing performance schema memory usage: T99485
-performance_schema_digests_size = -1
-performance_schema_max_thread_instances = 500
-performance_schema_max_cond_instances = 1000
-performance_schema_accounts_size = 300
-performance_schema_hosts_size = 300
-performance_schema_events_statements_history_size = 10
+performance_schema_digests_size                        = -1
+performance_schema_max_thread_instances                = 500
+performance_schema_max_cond_instances                  = 1000
+performance_schema_accounts_size                       = 300
+performance_schema_hosts_size                          = 300
+performance_schema_events_statements_history_size      = 10
 performance_schema_events_statements_history_long_size = 1000
-performance_schema_events_waits_history_size = 10
-performance_schema_events_waits_history_long_size = 1000
-performance_schema_events_stages_history_size = 10
-performance_schema_events_stages_history_long_size = 1000
-performance_schema_max_mutex_instances = 5000
-performance_schema_max_rwlock_instances = 2000
-performance_schema_max_socket_instances = 500
-performance_schema_max_table_instances = 1000
+performance_schema_events_waits_history_size           = 10
+performance_schema_events_waits_history_long_size      = 1000
+performance_schema_events_stages_history_size          = 10
+performance_schema_events_stages_history_long_size     = 1000
+performance_schema_max_mutex_instances                 = 5000
+performance_schema_max_rwlock_instances                = 2000
+performance_schema_max_socket_instances                = 500
+performance_schema_max_table_instances                 = 1000
+<% else %>
+# only enable userstat if p_s is disabled
+performance_schema                                     = 0
+userstat                                               = 1
 <% end %>
 
 optimizer_switch = 
'mrr=on,mrr_cost_based=on,mrr_sort_keys=on,optimize_join_buffer_size=on'

-- 
To view, visit https://gerrit.wikimedia.org/r/249480
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I33f0e137d434443863e8dfcb925ceff78c4714b6
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jcrespo <[email protected]>
Gerrit-Reviewer: Jcrespo <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to