Last modified: 2014-04-11 16:21:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T62210, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60210 - MediaWiki starts external PHP on every request - even if job queue is empty
MediaWiki starts external PHP on every request - even if job queue is empty
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JobQueue (Other open bugs)
1.22.0
All All
: High normal (vote)
: 1.23.0 release
Assigned To: Aaron Schulz
: performance
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-18 18:58 UTC by Christian Boltz
Modified: 2014-04-11 16:21 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Christian Boltz 2014-01-18 18:58:53 UTC
Probably since https://gerrit.wikimedia.org/r/#/c/59797/ job handling starts an external php process by default.

This happens even if the job queue is empty.

Is this intentional? I somehow doubt starting a php interpreter just to find out it's empty won't improve performance...

I'm quite sure checking the database if there are jobs to run won't be too "expensive", and can avoid lots of more expensive PHP interpreter starts ;-)
Comment 1 Jesús Martínez Novo (Ciencia Al Poder) 2014-01-18 20:13:41 UTC
I can confirm this bug.

Setting $wgPhpCli to a bash script that writes a line to a log file, on a development wiki with no edits and an empty job table, loading any page gives a new line on the log.
Comment 2 Gerrit Notification Bot 2014-02-27 19:18:01 UTC
Change 113038 merged by jenkins-bot:
Moved job running via $wgJobRunRate to a special API

https://gerrit.wikimedia.org/r/113038
Comment 3 Jesús Martínez Novo (Ciencia Al Poder) 2014-03-12 22:07:26 UTC
(In reply to Gerrit Notification Bot from comment #2)
> Change 113038 merged by jenkins-bot:
> Moved job running via $wgJobRunRate to a special API
> 
> https://gerrit.wikimedia.org/r/113038

This doesn't fix anything. It doesn't open a new shell, but makes a new api call even if there's no job in the queue.

Whith the default value of $wgJobRunRate = 1, that means every page request to MediaWiki is translated to 2 separate HTTP requests that the server must handle, with all the memory consumption that they involve.
Comment 4 Gerrit Notification Bot 2014-04-08 16:36:44 UTC
Change 124629 had a related patch set uploaded by Aaron Schulz:
Backoff doing job run requests when the queue is empty

https://gerrit.wikimedia.org/r/124629
Comment 5 Gerrit Notification Bot 2014-04-10 05:41:24 UTC
Change 124629 had a related patch set uploaded by Ori.livneh:
Avoid making a derivative request to Special:RunJobs when the job queue is empty

https://gerrit.wikimedia.org/r/124629
Comment 6 Gerrit Notification Bot 2014-04-10 05:54:14 UTC
Change 124629 merged by jenkins-bot:
Avoid making a derivative request to Special:RunJobs when the job queue is empty

https://gerrit.wikimedia.org/r/124629
Comment 7 Ori Livneh 2014-04-10 06:09:42 UTC
As of change Icb95c35f4, MediaWiki is smart enough to check that the queue is nonempty before spawning another request. And for those cases where resource constraints make the cost of an additional request prohibitive, I892a36082 added $wgRunJobsAsync, which can be used to disable parallelism altogether.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links