Page MenuHomePhabricator

Evaluate the performance improvements brought in by prefetching MW images on WikiKube hosts
Closed, ResolvedPublic

Assigned To
Authored By
akosiaris
Jun 6 2024, 9:01 AM
Referenced Files
F57604468: image.png
Oct 10 2024, 12:48 PM
F57453778: image.png
Sep 4 2024, 9:23 AM
F56700235: image.png
Jul 26 2024, 10:29 AM

Description

Intro

As of Nov 2022 (T323349), we have a scap helping script populated on WikiKube workers to prefetch mediawiki images so that deployment times in MW-on-K8s work fast enough.

Problem statement

Since then, there have been

  • a number of improvements in the infrastructure as well as (e.g. we no longer have nodes with HDDs)
  • a number of regression that have been addressed (e.g. T366094)
  • Plans to see how trimming down OCI image size (via altering how we do MultiVersion)

Furthermore, this script has also caused a number of failed deployments as it makes scap WikiKube deployments aware of individual hosts (e.g. a hardware failed WikiKube host shows up in scap output) and requiring manual actions by an SRE to set the host as inactive in conftool. The UX is also not great for the deployer as they don't get to benefit from one of the advantages of deploying to a kubernetes cluster, which is to abstract away specific nodes.

We need a way to gauge the the overall effects this script has and whether it's still needed now, in the short term and in the medium term future.

Description of plan

Add the ability to the script we have populated to skip execution in a probabilistic way. We define a percentage based threshold and then lower that threshold every few weeks and gauge the results.

Support has been added in https://gerrit.wikimedia.org/r/q/topic:%22mediawiki-image-download_pct%22

Some rough steps for the percentage would be:

  • 99%
  • 90%
  • 80%
  • 75%
  • 66%
  • 50%
  • 25%
  • 5%
  • 0%

At each of steps listed above, we stop and gauge the effects of the change. Given the duration needed to show something worthy of talking about, there is a good chance we will see regressions or fixes that mess with the numbers. This is something we will have to deal with.

Measurement

A simple plan to gauge this is to rely on scap action timings. The data exists in Logstash and should allow us to figure out the impact of our changes (up to a degree)

Event Timeline

Change #1039619 had a related patch set uploaded (by Alexandros Kosiaris; author: Alexandros Kosiaris):

[operations/puppet@production] mediawiki-image-download: Drop to 90%

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

Change #1039620 had a related patch set uploaded (by Alexandros Kosiaris; author: Alexandros Kosiaris):

[operations/puppet@production] mediawiki-image-download: Drop to 80%

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

Change #1039621 had a related patch set uploaded (by Alexandros Kosiaris; author: Alexandros Kosiaris):

[operations/puppet@production] mediawiki-image-download: Drop to 75%

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

Change #1039622 had a related patch set uploaded (by Alexandros Kosiaris; author: Alexandros Kosiaris):

[operations/puppet@production] mediawiki-image-download: Drop to 66%

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

Change #1039623 had a related patch set uploaded (by Alexandros Kosiaris; author: Alexandros Kosiaris):

[operations/puppet@production] mediawiki-image-download: Drop to 50%

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

Change #1039619 merged by Alexandros Kosiaris:

[operations/puppet@production] mediawiki-image-download: Drop to 90%

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

While it's a bit early to gauge this:

  • there is a 10% in the peaks of docker node pulls the forced pull being evaluated in this task
  • No discernible pattern for change for sync-prod-k8s (which is the metric I am targeting here)

Change #1039620 merged by Alexandros Kosiaris:

[operations/puppet@production] mediawiki-image-download: Drop to 80%

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

Change #1039621 merged by Alexandros Kosiaris:

[operations/puppet@production] mediawiki-image-download: Drop to 75%

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

No significant changes in the last month per

image.png (1,208×443 px, 55 KB)
, proceeding with the drop to 66%

Change #1039622 merged by Alexandros Kosiaris:

[operations/puppet@production] mediawiki-image-download: Drop to 66%

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

image.png (1,189×302 px, 42 KB)

Nothing concerning after all this time, if anything median time was a very slight ramp down.

I 'll submit the 50% today and then grow way more aggressive and go straight to 25%, followed by a 5% and then 0%

Change #1039623 merged by Alexandros Kosiaris:

[operations/puppet@production] mediawiki-image-download: Drop to 50%

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

Change #1070549 had a related patch set uploaded (by Alexandros Kosiaris; author: Alexandros Kosiaris):

[operations/puppet@production] mediawiki-image-download: Drop to 25%

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

Change #1070550 had a related patch set uploaded (by Alexandros Kosiaris; author: Alexandros Kosiaris):

[operations/puppet@production] mediawiki-image-download: Drop to 5%

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

Change #1070549 merged by Alexandros Kosiaris:

[operations/puppet@production] mediawiki-image-download: Drop to 25%

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

No perceptible changes in deployment times, I 'll merge the 5% drop today and I think we can fully remove this by Oct 3rd.

akosiaris triaged this task as Medium priority.Sep 13 2024, 5:21 PM
akosiaris updated the task description. (Show Details)

Change #1070550 merged by Alexandros Kosiaris:

[operations/puppet@production] mediawiki-image-download: Drop to 5%

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

akosiaris claimed this task.

I 'll resolve this one. Things overall are OK deployment times wise. In fact, there is a downward trend in the following graph

image.png (1,203×1,091 px, 102 KB)

so things are faster than what they used to be, so removing this bandaid didn't hurt after all.

Change #1079273 had a related patch set uploaded (by Alexandros Kosiaris; author: Alexandros Kosiaris):

[operations/puppet@production] mediawiki-image-download: Remove pct based pulls

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

Change #1079273 merged by Alexandros Kosiaris:

[operations/puppet@production] mediawiki-image-download: Remove pct based pulls

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