Last modified: 2014-11-19 21:47:00 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 T58602, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56602 - Set languageLinkSiteGroup in $wgWBClientSettings to avoid fetching SiteList object from memcached
Set languageLinkSiteGroup in $wgWBClientSettings to avoid fetching SiteList o...
Status: PATCH_TO_REVIEW
Product: MediaWiki extensions
Classification: Unclassified
WikidataClient (Other open bugs)
unspecified
All All
: Unprioritized critical (vote)
: ---
Assigned To: Wikidata bugs
: performance
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-05 06:22 UTC by Ori Livneh
Modified: 2014-11-19 21:47 UTC (History)
10 users (show)

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


Attachments

Description Ori Livneh 2013-11-05 06:22:44 UTC
Since I4e71671c8, WikibaseClient's OutputPageParserOutput & ParserAfterParse hook handlers call WikibaseClient::getDefaultInstance()->getLangLinkSiteGroup(). Since 
$wgWBClientSettings['languageLinkSiteGroup'] is unset, it defaults toWikibaseClient::getSite, which calls SiteSQLStore::getSites, which requires retrieving a huge object from memcached, with a predictable impact on the cluster: see <http://noc.wikimedia.org/~ori/SiteSQLStore.html> -- you can guess when I4e71671c8 was deployed.
Comment 1 Gerrit Notification Bot 2013-11-05 06:26:10 UTC
Change 93648 had a related patch set uploaded by Ori.livneh:
Set enwiki's languageLinkSiteGroup to 'wikipedia'

https://gerrit.wikimedia.org/r/93648
Comment 2 Gerrit Notification Bot 2013-11-05 06:30:42 UTC
Change 93648 merged by Ori.livneh:
Set enwiki's languageLinkSiteGroup to 'wikipedia'

https://gerrit.wikimedia.org/r/93648
Comment 3 Ori Livneh 2013-11-05 06:50:35 UTC
Didn't improve things a whole lot, since the call to getSite in WikibaseClient.hooks.php's onSkinTemplateOutputPageBeforeExec hook handler is executed much more frequently.
Comment 4 Ori Livneh 2013-11-05 06:57:16 UTC
(In reply to comment #3)
> Didn't improve things a whole lot, since the call to getSite in
> WikibaseClient.hooks.php's onSkinTemplateOutputPageBeforeExec hook handler is
> executed much more frequently.

That's Ie17f2af09, to be specific.
Comment 5 Gerrit Notification Bot 2013-11-05 17:41:48 UTC
Change 93661 merged by jenkins-bot:
Re-introduce siteGroup setting for performance reasons

https://gerrit.wikimedia.org/r/93661
Comment 6 Gerrit Notification Bot 2013-11-05 17:48:44 UTC
Change 93767 had a related patch set uploaded by Aude:
Re-introduce siteGroup setting for performance reasons

https://gerrit.wikimedia.org/r/93767
Comment 7 Gerrit Notification Bot 2013-11-05 17:54:15 UTC
Change 93767 merged by jenkins-bot:
Re-introduce siteGroup setting for performance reasons

https://gerrit.wikimedia.org/r/93767
Comment 8 Gerrit Notification Bot 2013-11-05 17:59:41 UTC
Change 93769 had a related patch set uploaded by Aude:
Update Wikibase, use siteGroup setting instead of doing lookup

https://gerrit.wikimedia.org/r/93769
Comment 9 Gerrit Notification Bot 2013-11-05 18:05:02 UTC
Change 93772 had a related patch set uploaded by Aude:
Update Wikibase, use siteGroup setting instead of doing lookup

https://gerrit.wikimedia.org/r/93772
Comment 10 Gerrit Notification Bot 2013-11-05 18:07:01 UTC
Change 93769 merged by jenkins-bot:
Update Wikibase, use siteGroup setting instead of doing lookup

https://gerrit.wikimedia.org/r/93769
Comment 11 Gerrit Notification Bot 2013-11-05 18:11:40 UTC
Change 93772 merged by jenkins-bot:
Update Wikibase, use siteGroup setting instead of doing lookup

https://gerrit.wikimedia.org/r/93772
Comment 12 Gerrit Notification Bot 2013-11-05 18:15:34 UTC
Change 93773 had a related patch set uploaded by Aude:
Add siteGroup setting for Wikibase

https://gerrit.wikimedia.org/r/93773
Comment 13 Gerrit Notification Bot 2013-11-05 19:02:50 UTC
Change 93773 merged by Ori.livneh:
Add siteGroup setting for Wikibase

https://gerrit.wikimedia.org/r/93773
Comment 14 Ori Livneh 2014-09-06 00:23:31 UTC
This is once again an issue; it is loading on every request.

Impact: http://i.imgur.com/v9ebld6.png
Comment 15 Ori Livneh 2014-11-17 09:37:16 UTC
This wasn't fixed, so I'm not sure why the bug was closed.
Comment 16 Faidon Liambotis 2014-11-17 09:46:20 UTC
This causes:
https://ganglia.wikimedia.org/latest/graph.php?r=year&z=xlarge&h=mc1005.eqiad.wmnet&m=network_report&s=by+name&mc=2&g=network_report&c=Memcached+eqiad
https://ganglia.wikimedia.org/latest/graph.php?r=year&z=xlarge&h=mc1011.eqiad.wmnet&m=network_report&s=by+name&mc=2&g=network_report&c=Memcached+eqiad
https://ganglia.wikimedia.org/latest/graph.php?r=year&z=xlarge&h=mc1014.eqiad.wmnet&m=cpu_report&s=by+name&mc=2&g=network_report&c=Memcached+eqiad

Top keys are:
enwiki:sites/SiteList#2014-03-17+Site:2013-01-23 (54MB/s)
wikidatawiki:sites/SiteList#2014-03-17+Site:2013-01-23 (20MB/s)
commonswiki:sites/SiteList#2014-03-17+Site:2013-01-23 (18MB/s)

This has been pointed out as early as September 2013, and again March 2014 and again September 2014 and is still happening. Having e.g. 80% of mc1005's total network bandwidth being a single wikidata key, or SiteList keys being consistently on the top of memcached bandwidth output by multiple factors compared to the rest, is frankly indicative of a serious design failure and unacceptable. I don't understand why this bug was closed either.
Comment 17 Aaron Schulz 2014-11-18 00:30:29 UTC
Can we just have a current version hash stored in memcached and used to validate server-local CDB caches (made on the fly, with a special key holding the hash of the other key/values). This would reduce the memcached I/O to a minuscule amount.
Comment 18 Gerrit Notification Bot 2014-11-18 13:41:43 UTC
Change 174113 had a related patch set uploaded by Aude:
Lazy initialize OtherProjectsSidebarGenerator in hook handlers

https://gerrit.wikimedia.org/r/174113
Comment 19 Aude 2014-11-19 21:47:00 UTC
my patch (https://gerrit.wikimedia.org/r/#/c/174113/) ensures the memcached lookup of SiteList is confined to users with the other projects beta feature enabled. This should help quite a lot to reduce memcached access for the SiteList.

the SiteList is used in similar functionality as the interwiki data, used to add links to related sister projects in the sidebar.

to roll out the feature more widely, we should have local caching (json, like i18n?) of the site list data and may want to have memcached store the hash (like done for i18n), per Aaron's suggestion.

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


Navigation
Links