jenkins-bot has submitted this change and it was merged.
Change subject: Update CirrusSearch PoolCounter for cross-dc search
......................................................................
Update CirrusSearch PoolCounter for cross-dc search
When default search is pointed at a remote datacenter some of the lowest
latency queries will hit their max worker cap much earlier, due to
queries being in-flight between DC's. This increases the worker count
when pointed at a remote datacenter by a factor of (p75+cross dc latency)/p75.
Bug: T128761
Change-Id: Ib3c74e5aaad01274499ec692a477ffb0651716aa
---
M wmf-config/CirrusSearch-common.php
M wmf-config/CommonSettings.php
2 files changed, 20 insertions(+), 0 deletions(-)
Approvals:
Thcipriani: Looks good to me, approved
jenkins-bot: Verified
diff --git a/wmf-config/CirrusSearch-common.php
b/wmf-config/CirrusSearch-common.php
index cc60135..e9bfe8f 100644
--- a/wmf-config/CirrusSearch-common.php
+++ b/wmf-config/CirrusSearch-common.php
@@ -141,6 +141,25 @@
// Set the scoring method
$wgCirrusSearchCompletionDefaultScore = 'popqual';
+// PoolCounter needs to be adjusted to account for additional latency when
default search
+// is pointed at a remote datacenter. Currently this makes the assumption that
it will either
+// be eqiad or codfw which have ~40ms latency between them. Multiples are
chosen using
+// (p75 + cross dc latency)/p75
+if ( $wgCirrusSearchDefaultCluster !== $wmfDatacenter ) {
+ // prefix has p75 of ~30ms
+ if ( isset( $wgPoolCounterConf[ 'CirrusSearch-Prefix' ] ) ) {
+ $wgPoolCounterConf['CirrusSearch-Prefix']['workers'] *= 2;
+ }
+ // namespace has a p75 of ~15ms
+ if ( isset( $wgPoolCounterConf['CirrusSearch-NamespaceLookup' ] ) ) {
+ $wgPoolCounterConf['CirrusSearch-NamespaceLookup']['workers']
*= 3;
+ }
+ // completion has p75 of ~30ms
+ if ( isset( $wgPoolCounterConf['CirrusSearch-Completion'] ) ) {
+ $wgPoolCounterConf['CirrusSearch-Completion'] *= 2;
+ }
+}
+
# Load per realm specific configuration, either:
# - CirrusSearch-labs.php
# - CirrusSearch-production.php
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 9c80d8e..e0b911c 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -885,6 +885,7 @@
# :SEARCH:
# All wikis are special and get Cirrus :)
+# Must come *AFTER* PoolCounterSettings.php
require_once( "$IP/extensions/Elastica/Elastica.php" );
require_once( "$IP/extensions/CirrusSearch/CirrusSearch.php" );
include( "$wmfConfigDir/CirrusSearch-common.php" );
--
To view, visit https://gerrit.wikimedia.org/r/274834
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3c74e5aaad01274499ec692a477ffb0651716aa
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Gehel <[email protected]>
Gerrit-Reviewer: Thcipriani <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits