Last modified: 2014-06-27 20:15:28 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 T67691, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65691 - Limit the number or expensive thumbnails that can be processed by the scalers in parallel
Limit the number or expensive thumbnails that can be processed by the scalers...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.24rc
All All
: Normal normal (vote)
: ---
Assigned To: Tisza Gergő
: performance
Depends on:
Blocks: 65217
  Show dependency treegraph
 
Reported: 2014-05-23 18:43 UTC by Tisza Gergő
Modified: 2014-06-27 20:15 UTC (History)
8 users (show)

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


Attachments

Description Tisza Gergő 2014-05-23 18:43:37 UTC
Certain files are very expensive to thumbnail (e.g. large TIFF files); receiving several such requests can bring the scalers down. This was a recurring issue with certain GWToolset uploads. To prevent such issues, there should be a way to mark files as expensive and throttle the scaling of such files.

This is tracked by the Multimedia team as https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/623 . The current plan is:

* have the media handler decide whether scaling the file is expensive, and pass that flag on
* for expensive files, the pool counter should bucket by some hash of the file name instead of the file name itself, so that there are only <range of hash function> slots available for expensive thumbnailing operations
* the hash has to be deterministic to avoid stampeding, and the range has to be configurable

This is not an ideal solution, since hash collisions will make it hard to estimate the exact effect of the throttling - some of the jobs will be blocked even when there are less jobs than available slots. It will make it easy to limit the maximum possible load though, which is still an improvement over the current situation.

(The alternative would be to just have a big "expensive thumbnails" bucket without any kind of hashing - given that expensive thumbnail requests are slow and likely to be stampeded, that would be even worse.)
Comment 1 Gerrit Notification Bot 2014-05-27 21:46:19 UTC
Change 135702 had a related patch set uploaded by Gergő Tisza:
Add global limit to PoolCounter

https://gerrit.wikimedia.org/r/135702
Comment 2 Gerrit Notification Bot 2014-05-27 21:46:24 UTC
Change 135703 had a related patch set uploaded by Gergő Tisza:
Use separate PoolCounter config for expensive thumbnails

https://gerrit.wikimedia.org/r/135703
Comment 3 Gerrit Notification Bot 2014-05-29 00:36:27 UTC
Change 135976 had a related patch set uploaded by Gergő Tisza:
Set expensive flag for large TIFF files

https://gerrit.wikimedia.org/r/135976
Comment 4 Gerrit Notification Bot 2014-05-29 09:01:03 UTC
Change 135976 merged by jenkins-bot:
Set expensive flag for large TIFF files

https://gerrit.wikimedia.org/r/135976
Comment 5 Gerrit Notification Bot 2014-05-29 09:02:16 UTC
Change 135701 merged by jenkins-bot:
Allow media handlers to mark files as expensive

https://gerrit.wikimedia.org/r/135701
Comment 6 Gerrit Notification Bot 2014-06-04 08:39:51 UTC
Change 135702 merged by jenkins-bot:
Add global limit to PoolCounter

https://gerrit.wikimedia.org/r/135702
Comment 7 Gerrit Notification Bot 2014-06-27 18:56:20 UTC
Change 135704 merged by jenkins-bot:
Limit the number of expensive thumbnails processed at the same time

https://gerrit.wikimedia.org/r/135704
Comment 8 Gerrit Notification Bot 2014-06-27 20:10:59 UTC
Change 135703 merged by jenkins-bot:
Use separate PoolCounter config for expensive thumbnails

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

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


Navigation
Links