Last modified: 2014-03-06 14:59:16 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 T57929, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55929 - Separate replica datacenter causes high query latency
Separate replica datacenter causes high query latency
Status: VERIFIED FIXED
Product: Wikimedia Labs
Classification: Unclassified
Infrastructure (Other open bugs)
unspecified
All All
: Unprioritized major
: ---
Assigned To: Ryan Lane
:
Depends on:
Blocks: labs-replication tool-missing-ts-feat 48851 53987 61037
  Show dependency treegraph
 
Reported: 2013-10-20 04:26 UTC by Jesse (Pathoschild)
Modified: 2014-03-06 14:59 UTC (History)
16 users (show)

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


Attachments

Description Jesse (Pathoschild) 2013-10-20 04:26:45 UTC
The database replicas are in a different datacenter than Tools Labs. The resulting latency (26ms per query) has a major performance impact on tools that need to make many queries. This prevents the migration of many Toolserver tools (notably crosswiki tools).

This is a tracking ticket for plans to combine the datacenters to address this, mentioned here: http://lists.wikimedia.org/pipermail/labs-l/2013-September/001574.html

Repro
-----
The following scripts reproduce the latency issue. They open a connection to each database server, then execute a sample query for each wiki ("use `xxwiki`").

Toolserver: https://toolserver.org/~pathoschild/accounteligibility/test.php | 
source: http://pastebin.com/ctUQsXZm

Tools Labs: http://tools.wmflabs.org/pathoschild-contrib/accounteligibility/test.php | source: http://pastebin.com/Xi3abGFP

This runs in 0.3 seconds on the Toolserver, but takes a whopping 23 seconds on
Tools Labs. The scripts shows the profiling results at the bottom of the page (click the [+] next to "Page generated in XX seconds").
Comment 1 Marc A. Pelletier 2013-10-29 13:51:09 UTC
As a note, most tools can be tweaked to make that issue mostly irrelevant by batching row I/O (fetching or inserting more than one row at a time) since the lag only affects roundtrips.
Comment 2 Jesse (Pathoschild) 2013-12-04 16:12:36 UTC
The latest timeline for this is mid-January[1], but all Toolserver accounts have been set to expire in early January[2]. Tool authors waiting for this ticket should make sure to renew their accounts before then.

[1]: http://lists.wikimedia.org/pipermail/labs-l/2013-November/001845.html
[2]: http://lists.wikimedia.org/pipermail/toolserver-l/2013-November/006379.html
Comment 3 Silke Meyer (WMDE) 2014-01-23 17:49:02 UTC
What has become of this issue since you moved Tool Labs in December? Is it still valid?
Comment 4 Nemo 2014-01-23 17:51:54 UTC
(In reply to comment #3)
> What has become of this issue since you moved Tool Labs in December? Is it
> still valid?

Yes, except that it got 50 % slower in the meanwhile:

Page generated in 31.614 seconds. [+]

    fetch wikis: 0.183 (0.58%)
    connect to each slice: 0.756 (2.39%)
    switch to each wiki DB: 30.669 (97.01%)
Comment 5 Jesse (Pathoschild) 2014-01-23 23:32:59 UTC
The latest timeline is now mid-March; the last blocker is the OpenStack setup by a contractor. See discussion at https://meta.wikimedia.org/wiki/IRC_office_hours/Office_hours_2014-01-23
Comment 6 Jesse (Pathoschild) 2014-03-05 05:08:04 UTC
Tool authors can now migrate to the new infrastructure[1], which resolves this issue.

[1]: http://lists.wikimedia.org/pipermail/labs-l/2014-March/002160.html
Comment 7 Tim Landscheidt 2014-03-05 11:06:39 UTC
Okay, closing then.  (Well, FIXED doesn't quite fit it, but I think it's appropriate :-).)
Comment 8 Nemo 2014-03-05 11:17:38 UTC
Pathos, please mark this VERIFIED when you've migrated your tools and confirmed they run as fast as they should.
Comment 9 Cyberpower678 2014-03-05 14:20:25 UTC
(In reply to Tim Landscheidt from comment #7)
> Okay, closing then.  (Well, FIXED doesn't quite fit it, but I think it's
> appropriate :-).)

Well actually it is fixed, as the tool has been optimized, by me, to perform quickly on pmtpa, and should run even faster once I migrate them eqiad.
Comment 10 Cyberpower678 2014-03-05 18:39:26 UTC
(In reply to Cyberpower678 from comment #9)
> (In reply to Tim Landscheidt from comment #7)
> > Okay, closing then.  (Well, FIXED doesn't quite fit it, but I think it's
> > appropriate :-).)
> 
> Well actually it is fixed, as the tool has been optimized, by me, to perform
> quickly on pmtpa, and should run even faster once I migrate them eqiad.

And I just realized this went in the wrong bug.  Whoops.

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


Navigation
Links