Gehel has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/370834 )

Change subject: Switch elastic1017-1031 to niofs
......................................................................


Switch elastic1017-1031 to niofs

By default elasticsearch uses an mmap file store implementation
for 64 bit linux hosts. This works on most of our servers, but after
the upgrade from elasticsearch 2 to elasticsearch 5 these servers
have seen drastically increased IO load, and the linux kernel reports
only about half of the available disk caching memory is actually being
mmap'd into the process. On a single test machine a switch to niofs
dramatically decreased IO and appears to have let the servers access
the full disk caching memory.

Bug: T169498
Change-Id: I8ea4689356f738932567ee27b5f4e7f5b4759491
---
M hieradata/regex.yaml
M modules/elasticsearch/manifests/init.pp
M modules/elasticsearch/templates/elasticsearch_5.yml.erb
M modules/profile/manifests/elasticsearch.pp
4 files changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml
index dbaa90d..bb995c2 100644
--- a/hieradata/regex.yaml
+++ b/hieradata/regex.yaml
@@ -38,6 +38,10 @@
   profile::elasticsearch::rack: D5
   profile::elasticsearch::row:  D
 
+es_eqiad_niofs:
+    __regex: !ruby/regexp /^elastic10(1\d|2\d|30|31)\.eqiad\.wmnet$/
+    profile::elasticsearch::index_store: niofs
+
 es_eqiad_rack_a3:
   __regex: !ruby/regexp 
/^(elastic10(30|31|32|33|34|35)|relforge1001)\.eqiad\.wmnet$/
   profile::elasticsearch::rack: A3
diff --git a/modules/elasticsearch/manifests/init.pp 
b/modules/elasticsearch/manifests/init.pp
index fef01ae..4f82e84 100644
--- a/modules/elasticsearch/manifests/init.pp
+++ b/modules/elasticsearch/manifests/init.pp
@@ -80,6 +80,10 @@
 #        and port are used. Defaults to undef, which means no remote reindex 
can occur.
 # - $script_max_compilations_per_minute: integer, max number of script
 #        compilations per minute, defaults to undef (see T171579).
+# - $index_store: Sets the storage implementation elasticsearch will use to
+#        access index data. Defaults to fs which lets elasticsearch decide.
+#        This should almost always be fs unless there is a specific issue to
+#        be solved.
 #
 # == Sample usage:
 #
@@ -120,6 +124,7 @@
     $curator_uses_unicast_hosts = true,
     $reindex_remote_whitelist = undef,
     $script_max_compilations_per_minute = undef,
+    $index_store = 'fs',
 ) {
 
     # Check arguments
diff --git a/modules/elasticsearch/templates/elasticsearch_5.yml.erb 
b/modules/elasticsearch/templates/elasticsearch_5.yml.erb
index 196931d..b4a2d59 100644
--- a/modules/elasticsearch/templates/elasticsearch_5.yml.erb
+++ b/modules/elasticsearch/templates/elasticsearch_5.yml.erb
@@ -135,6 +135,7 @@
 # Use the Index Status API (<http://localhost:9200/A/_status>) to inspect
 # the index status.
 
+index.store.type: <%= @index_store %>
 
 #################################### Paths ####################################
 
diff --git a/modules/profile/manifests/elasticsearch.pp 
b/modules/profile/manifests/elasticsearch.pp
index b84f3f9..24115fd 100644
--- a/modules/profile/manifests/elasticsearch.pp
+++ b/modules/profile/manifests/elasticsearch.pp
@@ -29,6 +29,7 @@
     $recover_after_nodes = 
hiera('profile::elasticsearch::recover_after_nodes', 1),
     $search_shard_count_limit = 
hiera('profile::elasticsearch::search_shard_count_limit'),
     $reindex_remote_whitelist = 
hiera('profile::elasticsearch::reindex_remote_whitelist'),
+    $index_store = hiera('profile::elasticsearch::index_store', 'fs'),
 ) {
     $master_eligible = $::fqdn in $unicast_hosts
 
@@ -100,6 +101,7 @@
         search_shard_count_limit           => $search_shard_count_limit,
         reindex_remote_whitelist           => $reindex_remote_whitelist,
         script_max_compilations_per_minute => 10000,
+        index_store                        => $index_store,
     }
 
     class { '::elasticsearch::https':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8ea4689356f738932567ee27b5f4e7f5b4759491
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org>
Gerrit-Reviewer: EBernhardson <ebernhard...@wikimedia.org>
Gerrit-Reviewer: Gehel <guillaume.leder...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to