Page MenuHomePhabricator

Tune Elasticsearch Shard counts
Closed, ResolvedPublic

Description

We've seen warnings for >50GB shards for commonswiki_file, and while we're at it we want to do a quick scan to see if other shard types are nearing the limit.

Shard count configuration lives here: https://github.com/wikimedia/operations-mediawiki-config/blob/master/wmf-config/InitialiseSettings.php#L23391

The intention is to buy us hopefully 2 years or so, at which point we should have 10G networking on our Elasticsearch cluster which would let us start using higher shard counts because rebalancing shards across nodes (for example after a node drops offline) is ratelimited by network throughput.

The tradeoff here is, as a general rule, bigger shards mean less overhead, but are slower to rebalance due to the above.

In addition to the shard tuning, we should also tune the "rescore":

we run a second phase of scoring over the top N documents per shard, and now there will be ~40% more shards, so 40% more docs in the rescore phase


CODE CHANGES

  • Tune the shard counts
  • Tune the rescore
  • Make replica counts same between eqiad/codfw everywhere given that they now have equal # of servers (36 each).
    • Functionally this means enwiki_content and dewiki_content for codfw need replica count bumped 2->3

DEPLOYMENT

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 608965 had a related patch set uploaded (by Ryan Kemper; owner: Ryan Kemper):
[operations/mediawiki-config@master] Scale largest shards to be closer to 30GB

https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/ /608965

Note that cloudelastic is also alerting on this same shard size issue. I assume that the reshard will also fix it on cloudelastic.

RKemper updated the task description. (Show Details)
RKemper updated the task description. (Show Details)

Change 608965 merged by Ryan Kemper:
[operations/mediawiki-config@master] Scale largest shards to be closer to 30GB

https://gerrit.wikimedia.org/r/608965

Change 612377 had a related patch set uploaded (by Ryan Kemper; owner: Ryan Kemper):
[operations/mediawiki-config@master] Scale largest shards to be closer to 30GB

https://gerrit.wikimedia.org/r/612377

Change 612377 merged by jenkins-bot:
[operations/mediawiki-config@master] Scale largest shards to be closer to 30GB

https://gerrit.wikimedia.org/r/612377

Mentioned in SAL (#wikimedia-operations) [2020-07-13T18:18:40Z] <dcausse@deploy1001> Synchronized wmf-config/InitialiseSettings.php: T256928: Scale largest shards to be closer to 30GB (duration: 00m 56s)

Change 616916 had a related patch set uploaded (by Ebernhardson; owner: Ebernhardson):
[operations/mediawiki-config@master] cirrus: Reduce MLR window size on enwiki

https://gerrit.wikimedia.org/r/616916

Change 616916 merged by jenkins-bot:
[operations/mediawiki-config@master] cirrus: Reduce MLR window size on enwiki

https://gerrit.wikimedia.org/r/616916

Shard size for commonswiki_file is again close to 50 starting to cause icinga alerts (commonswiki_content_1587046674(54.5gb)).