Help:Job queue: Difference between revisions

Content deleted Content added
Wikipedia technical help
 
(37 intermediate revisions by 22 users not shown)
Line 1:
{{redirect|WP:QUEUE|the "did you know" queue|Template:Did you know/Queue}}
{{information page|WP:JQ}}
 
In MediaWiki 1.6, a '''job queue''' was introduced to perform long-running tasks asynchronously. The job queue is designed to hold many short tasks using [[:en:batch processing|batch processing]]. Up to MediaWiki 1.16, an estimate of the length of the job queue was shown at [[Special:Statistics]]. By default, each time a request runs, one job is taken from the job queue and executed.
 
== Updating links tables when a template changes ==
MediaWiki 1.6 adds a job to the job queue for each article using a template. Each job is a command to read an article, expand any templates, and update the link[[mw:pagelinks table|pagelinks table]] accordingly. So null edits are no longer necessary, although it may take a while for big operations to complete. This can help to ease strain on users.
 
== HTML cache invalidation ==
Line 16 ⟶ 18:
 
== Typical values ==
During a period of low loads, the job queue might be zero. At Wikimedia, the job queue is, in practice, almost never zero. In off-peak hours, it might be a few hundred to a thousand. During a busy day, it might be a few hundred thousand (values of several million are no cause for alarm), but it can quickly fluctuate by 10% or more.<ref>{{citeCite web|url=httphttps://leuksmanbrionv.com/log/2008/04/22/so-whats-in-the-job-queue-anyway/ |title=leŭksman » Blog Archive » So what’swhat's in the job queue anyway? |publisherwebsite=Leuksman.com brionv|date=2008-04-22 |accessdate=20092019-10-3014|archive-date=2019-04-04|archive-url=https://web.archive.org/web/20190404042109/https://brionv.com/log/2008/04/22/so-whats-in-the-job-queue-anyway/|url-status=live}}</ref> Also as mentioned aboveFurthermore, several servers will have different estimates for this value so apparently more varying fluctuations can also be seen.
 
As of MediaWiki 1.17, job queue length can be retrieved via the API at httphttps://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=statistics (it is shown on the line labeled "jobs=").<ref>[[{{Cite web|url=https://www.mediawiki.org/wiki/Manual:Job_queue#Special:Statistics|title=mw:Manual:Job queue]]#Special:Statistics|website=MediaWiki|accessdate=2024-06-07|archive-date=2024-06-07|archive-url=https://web.archive.org/web/20240607093114/https://www.mediawiki.org/wiki/Manual:Job_queue#Special:Statistics|url-status=live}}</ref> On Wikipedia this value can come from one of several servers (three as of 2009) and so may fluctuate significantly.
 
== See also ==
As a special en.wiki monitoring tool, since August 2011 automatically generated graphs are available, but are broken as of 2013.<ref>On [http://ganglia.wikimedia.org/latest/graph_all_periods.php?c=Miscellaneous%20pmtpa&h=spence.wikimedia.org&v=93084&m=enwiki_JobQueue_length&r=hour&z=default&jr=&js=&st=1325547418&z=large ganglia].</ref>
* [[mw:Redis]]
In April 2013, a graph for the global queue in all Wikimedia projects was available,<ref>[https://ganglia.wikimedia.org/latest/graph_all_periods.php?c=Miscellaneous%20eqiad&h=terbium.eqiad.wmnet&r=hour&z=default&jr=&js=&st=1394534854&v=181444&m=Global_JobQueue_length&z=large Ganglia] (as of March 2014; [https://ganglia.wikimedia.org/latest/graph_all_periods.php?c=Miscellaneous%20pmtpa&h=hume.wikimedia.org&v=823574&m=Global_JobQueue_length&r=hour&z=default&jr=&js=&st=1365625056&z=large old data on "hume"]).</ref> in addition to the processed items counts.<ref>[https://gdash.wikimedia.org/dashboards/jobq/ Gdash].</ref> As of November 2015, those are broken, but new dashboards showing job queue health<ref>[https://grafana.wikimedia.org/dashboard/db/job-queue-health Grafana job queue health dashboard]</ref> and rate<ref>[https://grafana.wikimedia.org/dashboard/db/job-queue-rate Grafana job queue rate dashboard]</ref> are available.
* [[mw:Manual:Job queue]]
 
==See also==
*[[mw:Redis]]
*[[mw:Manual:Job queue]]
 
== References ==
{{reflistReflist}}
 
{{Wikipedia technical help|state=collapsed}}