Page MenuHomePhabricator

Re-enable daily updates of formerly slow enwiki QueryPages
Open, Needs TriagePublic

Description

Background: in T142936: Generate Special:LonelyPages on a more regular basis, we switched very slow enwiki QueryPages from biyearly to monthly. Currently the config looks like:

# Disable all the query pages that take more than about 15 minutes to update
# Specify a "run mode" when a cron job is set up for the special page and
# also create a message for the "run mode" in WikimediaMessages extension with
# the message key 'querypage-updates-<run mode>'
# wgDisableQueryPageUpdate @{
'wgDisableQueryPageUpdate' => [
	'default' => [
		'Ancientpages' => 'half-monthly',
		'Deadendpages' => 'half-monthly',
		'Fewestrevisions' => 'half-monthly',
		'Mostlinked' => 'half-monthly',
		'Mostrevisions' => 'half-monthly',
		'Wantedpages' => 'half-monthly',
	],
	'small' => [], // T45668
	'medium' => [], // T48094

	// Individual wikis
	'+enwiki' => [
		'Lonelypages' => 'monthly',
		'Mostcategories' => 'monthly',
		'Mostlinkedcategories' => 'monthly',
		'Mostlinkedtemplates' => 'monthly',
		'Uncategorizedcategories' => 'monthly',
		'Wantedtemplates' => 'monthly',
	],
        ...
],

For whatever reason, whether it's MediaWiki schema changes, better hardware, etc., these pages are much faster now.

  • Lonelypages: 8 minutes
  • Mostcategories: 6-7 minutes
  • Mostlinkedcategories: no longer expensive, the cronjob literally does nothing.
  • Mostlinkedtemplates: 20-24 minutes
  • Uncategorizedcategories: 1-3 minutes
  • Wantedtemplates: 10-13 minutes

Question for DBA: can we move these pages to the standard update timeline (every 3 days) now? Note that in T307314#7997375 I've already asked to increase that frequency over time to daily. If we need to leave Mostlinkedtemplates on the slow queue that would be understandable.

Event Timeline

Change 804803 had a related patch set uploaded (by Legoktm; author: Legoktm):

[operations/puppet@production] mediawiki: Disable useless mostlinkedcategories update job

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

Change 804805 had a related patch set uploaded (by Legoktm; author: Legoktm):

[operations/mediawiki-config@master] Remove misleading "disable" of Special:Mostlinkedcategories

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

I think that's fine as long as they go to the vslow replica. Further, if we can make all this to reload the DB config (T298485) often that'd be great so it doesn't mess up with schema changes (even if the runtime times you posted are quite fast, it would be good to have it implemented).

Change 804803 merged by Legoktm:

[operations/puppet@production] mediawiki: Disable useless mostlinkedcategories update job

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

Change 804805 merged by jenkins-bot:

[operations/mediawiki-config@master] Remove misleading "disable" of Special:Mostlinkedcategories

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

Mentioned in SAL (#wikimedia-operations) [2023-04-05T23:50:46Z] <legoktm@deploy2002> Started scap: Backport for [[gerrit:804805|Remove misleading "disable" of Special:Mostlinkedcategories (T310456)]]

Mentioned in SAL (#wikimedia-operations) [2023-04-05T23:52:08Z] <legoktm@deploy2002> legoktm: Backport for [[gerrit:804805|Remove misleading "disable" of Special:Mostlinkedcategories (T310456)]] synced to the testservers: mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug2002.codfw.wmnet, mwdebug1001.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-04-05T23:58:41Z] <legoktm@deploy2002> Finished scap: Backport for [[gerrit:804805|Remove misleading "disable" of Special:Mostlinkedcategories (T310456)]] (duration: 07m 55s)

@Legoktm: Removing task assignee as this open task has been assigned for more than two years - See the email sent to task assignee on October 11th.
Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome! :)
If this task has been resolved in the meantime, or should not be worked on by anybody ("declined"), please update its task status via "Add Action… 🡒 Change Status".
Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator. Thanks!

Has this task been addressed? Even if reports take a while to update, it is useful to have them updated daily in order to detect vandalism and other inappropriate edits.

Has this task been addressed? Even if reports take a while to update, it is useful to have them updated daily in order to detect vandalism and other inappropriate edits.

Hi, can you tell me which reports help you detect vandalism?

Has this task been addressed? Even if reports take a while to update, it is useful to have them updated daily in order to detect vandalism and other inappropriate edits.

Hi, can you tell me which reports help you detect vandalism?

Any of the above reports, and many more, when they are updated frequently and thus able to be monitored and kept clean regularly, can indicate vandalism. Vandals and careless editors remove categories, leaving pages uncategorized. They remove links, leaving pages as dead ends. They remove valid transclusions of templates, leaving templates on a "not transcluded" report. You name it, vandals do it, and one purpose of pretty much every error-tracking category and report is keeping an eye on vandalism and being able to revert it quickly. When a report is refreshed only monthly or semi-monthly, that job gets much more difficult, and vandalized pages are visible to the world for much longer.

Here's an example: This careless edit removed the documentation from a template, which caused the page to appear on a report of templates with no categories. Because we keep that report clean and it refreshes daily, the careless edit was easy to fix before it was seen by many people, and before it was amended or "fixed" in some unhelpful way.

I believe we should wait until T309738: Move MediaWiki QueryPages computation to Hadoop is resolved, then we will have a better way to generate query pages. (T422446: Move SpecialLonelyPages computation to Hadoop should be reopened)

Has this task been addressed? Even if reports take a while to update, it is useful to have them updated daily in order to detect vandalism and other inappropriate edits.

Hi, can you tell me which reports help you detect vandalism?

Any of the above reports, and many more, when they are updated frequently and thus able to be monitored and kept clean regularly, can indicate vandalism. Vandals and careless editors remove categories, leaving pages uncategorized. They remove links, leaving pages as dead ends. They remove valid transclusions of templates, leaving templates on a "not transcluded" report. You name it, vandals do it, and one purpose of pretty much every error-tracking category and report is keeping an eye on vandalism and being able to revert it quickly. When a report is refreshed only monthly or semi-monthly, that job gets much more difficult, and vandalized pages are visible to the world for much longer.

Here's an example: This careless edit removed the documentation from a template, which caused the page to appear on a report of templates with no categories. Because we keep that report clean and it refreshes daily, the careless edit was easy to fix before it was seen by many people, and before it was amended or "fixed" in some unhelpful way.

In this example, which report would have reflected that? The problem is that I need to know which one of these reports are higher priority and which ones can be done semi-regularly.

I believe once we complete the script to generate reports (Commons needs every report other than LonelyPages), we can generate reports of large wikis every day using such script (and should, to reduce database load).

I believe once we complete the script to generate reports (Commons needs every report other than LonelyPages), we can generate reports of large wikis every day using such script (and should, to reduce database load).

Sqoops are monthly so by nature you can't make daily reports from hadoop script.

Has this task been addressed? Even if reports take a while to update, it is useful to have them updated daily in order to detect vandalism and other inappropriate edits.

Hi, can you tell me which reports help you detect vandalism?

Any of the above reports, and many more, when they are updated frequently and thus able to be monitored and kept clean regularly, can indicate vandalism. Vandals and careless editors remove categories, leaving pages uncategorized. They remove links, leaving pages as dead ends. They remove valid transclusions of templates, leaving templates on a "not transcluded" report. You name it, vandals do it, and one purpose of pretty much every error-tracking category and report is keeping an eye on vandalism and being able to revert it quickly. When a report is refreshed only monthly or semi-monthly, that job gets much more difficult, and vandalized pages are visible to the world for much longer.

Here's an example: This careless edit removed the documentation from a template, which caused the page to appear on a report of templates with no categories. Because we keep that report clean and it refreshes daily, the careless edit was easy to fix before it was seen by many people, and before it was amended or "fixed" in some unhelpful way.

In this example, which report would have reflected that? The problem is that I need to know which one of these reports are higher priority and which ones can be done semi-regularly.

In this example, https://en.wikipedia.org/wiki/Wikipedia:Database_reports/Uncategorized_templates was the report in question. That is not one of the reports in the original list, but many such reports have been redundantly recreated by editors who are tired of waiting for this issue to be addressed. That is probably causing more server load overall than daily refreshes of these Special reports would cause.

https://en.wikipedia.org/wiki/Wikipedia:Database_reports/Dead-end_pages is another example of a report that I created because https://en.wikipedia.org/wiki/Special:DeadendPages is not refreshed frequently enough to address the problem that the report is supposed to address. Delinked, blanked, or vandalized articles can sit for weeks before they show up on that system report. Individual editors on every wikimedia site should not have to recreate these system reports.

I hope that makes sense. I'm not blaming here; I just want more frequent reports, which are clearly possible but for some reason not happening.

In this example, which report would have reflected that? The problem is that I need to know which one of these reports are higher priority and which ones can be done semi-regularly.

In this example, https://en.wikipedia.org/wiki/Wikipedia:Database_reports/Uncategorized_templates was the report in question. That is not one of the reports in the original list, but many such reports have been redundantly recreated by editors who are tired of waiting for this issue to be addressed. That is probably causing more server load overall than daily refreshes of these Special reports would cause.

The queries that produce DBRs actually hit Wikireplicas which are different servers than production databases. They are designed to have queries that take a lot of time and their issues won't interfere with production traffic. If you use the infra resource for wiki-stuff, by all means, use as much as resource as you want. The problem is that in production, they can cause issues for normal traffic and that's the problem. Not resource usage per-se

https://en.wikipedia.org/wiki/Wikipedia:Database_reports/Dead-end_pages is another example of a report that I created because https://en.wikipedia.org/wiki/Special:DeadendPages is not refreshed frequently enough to address the problem that the report is supposed to address. Delinked, blanked, or vandalized articles can sit for weeks before they show up on that system report. Individual editors on every wikimedia site should not have to recreate these system reports.

I hope that makes sense. I'm not blaming here; I just want more frequent reports, which are clearly possible but for some reason not happening.

Totally, I understand, it's just that the current design in production needs a complete revamp. They are called OLTP systems and are not designed to handle such queries. There are OLAP systems like hadoop that can handle it but they don't get updated frequently (it's monthly). There are some plans to use something like CDC to allow for more real-time OLAP system but it'll take a while before it'll be functional.

I think, we should have OLAP systems in WMCS (T215858) and which would take away all of this out of mediawiki so users can build tools in toolforge that would produce these reports (and many more that mediawiki devs haven't thought of) fast (basically decentralize it). But that's also a longer term solution.

Wow, that's a lot of infrastructure jargon that I don't understand. As an end user, what I do understand is that the reports that we run on the replicas are able to run daily and on-demand with little trouble, unless they time out. Maybe in the short term, some of the Special reports can run against the replicas instead of against servers that will bog down if reports are run against them. Then they could run more frequently.

Another way to think about it: I'd rather have a report that ran once a day against a database that might be slightly out of date than a report that runs once a month against any kind of database.