Page MenuHomePhabricator

Special:Homepage: Add instrumentation for monitoring transfer size and firstPaint
Closed, ResolvedPublic

Description

We're adding more data to the server side response on Special:Homepage, for example, rEGREc3fc552b9195: NewImpact: Export user impact data from server-side added the user impact data blob to the data we export for use with mw.config on the client-side. We'd like to keep an eye on our page size to make sure we are doing anything too egregious in transfer sizes.

From @Krinkle in IRC:

Krinkle> kostajh: note that client side, you have access to responseStart (latency plus receipt of first byte), responseEnd (download time of HTML), and transferSize, and eg firstPaint. That's transfer size as transferred incl any headers and use of gzip. That would be more representative. The timing values might on their own be more valuable though as that's what people perceive.

We already have some server-side rendering times in Grafana, but we could supplement those with client-side metrics as well.

So in sum, in this task we should code to instrument, and panels in Grafana, for the following:

  • Special:Homepage response size on the client-side. I don't think this needs to vary by wiki.
  • Special:Homepage responseStart - responseEnd times. This might be interesting to vary by wiki, or by geographical country, but we could probably just start with a generic measurement across all wikis and locations for now.

Event Timeline

kostajh renamed this task from Special:Homepage: Add instrumentation for monitoring transfer size to Special:Homepage: Add instrumentation for monitoring transfer size and firstPaint.Dec 1 2022, 11:27 AM

Change 862853 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] Instrumentation: Monitor navigation duration, transferSize, first paint

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

Change 864915 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@wmf/1.40.0-wmf.13] Instrumentation: Monitor navigation duration, transferSize, first paint

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

Change 862853 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Instrumentation: Monitor navigation duration, transferSize, first paint

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

Change 864915 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.40.0-wmf.13] Instrumentation: Monitor navigation duration, transferSize, first paint

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

Mentioned in SAL (#wikimedia-operations) [2022-12-06T14:42:18Z] <kharlan@deploy1002> Started scap: Backport for [[gerrit:864915|Instrumentation: Monitor navigation duration, transferSize, first paint (T324198)]]

Mentioned in SAL (#wikimedia-operations) [2022-12-06T14:44:12Z] <kharlan@deploy1002> kharlan and kharlan: Backport for [[gerrit:864915|Instrumentation: Monitor navigation duration, transferSize, first paint (T324198)]] synced to the testservers: mwdebug1002.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug2001.codfw.wmnet, mwdebug1001.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2022-12-06T14:52:26Z] <kharlan@deploy1002> Finished scap: Backport for [[gerrit:864915|Instrumentation: Monitor navigation duration, transferSize, first paint (T324198)]] (duration: 10m 07s)

Change 862853 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Instrumentation: Monitor navigation duration, transferSize, first paint

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

I left a post-merge note in Gerrit that I hope is of use. Looks good otherwise. Nice work!

Change 862853 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Instrumentation: Monitor navigation duration, transferSize, first paint

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

I left a post-merge note in Gerrit that I hope is of use. Looks good otherwise. Nice work!

Thank you for the note, that is helpful! We will rework the first-contentful-paint code in this task.

Change 877166 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] Monitoring: Use first-contentful-paint

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

Change 877166 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Monitoring: Use first-contentful-paint

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