Last modified: 2013-08-26 18:59:54 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 T48659, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46659 - Record performance numbers during RT testing
Record performance numbers during RT testing
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
tests (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Marc Ordinas i Llopis
:
Depends on: 44651 44652
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-28 21:47 UTC by ssastry
Modified: 2013-08-26 18:59 UTC (History)
7 users (show)

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


Attachments

Description ssastry 2013-03-28 21:47:14 UTC
The RT testing setup should measure performance for individual pages and record them in the database so we have a sense of how Parsoid is performing (and improving/regressing).

The numbers could be split into: (a) parse time (b) serialize-time (c) total time; and anything else and recorded in the db.  We could also add additional web endpoints to display performance stats of various kinds, possibly also highlight noticeable/significant perf. improvements / regressions, outliers in terms of parse/serialize times, and anything else that would be useful.
Comment 1 Gabriel Wicke 2013-03-29 19:43:52 UTC
Since we need to change the schema for bug 44652 and bug 44651 too, it probably makes sense to tackle these three bugs at once. Thus adding a cyclic dependency.
Comment 2 Gabriel Wicke 2013-04-08 22:59:52 UTC
It would also be useful to collect stats on the number of template expansions, extensions and images in a page.
Comment 3 C. Scott Ananian 2013-07-11 15:57:53 UTC
We've also been asked (by James_F) about the bandwidth implications of parsoid markup.  So we could collect, for each page, the size of the wikitext (raw and gzip-compressed) and the size of the corresponding parsoid markup (raw, gzip-compressed, and gzip-compressed-after-stripping data-parsoid attributes).
Comment 4 Gabriel Wicke 2013-07-11 16:12:57 UTC
The most important size number for production will really be:

gzip-compressed, without data-parsoid, but with unique id on each node.
Comment 5 Gerrit Notification Bot 2013-08-09 16:07:40 UTC
Change 78398 had a related patch set uploaded by Marcoil:
WIP - Record performance numbers during RT testing

https://gerrit.wikimedia.org/r/78398
Comment 6 Marc Ordinas i Llopis 2013-08-09 16:16:07 UTC
The patch I've uploaded to Gerrit is still a Work In Progress, but the basic functionality is there.

Principal points:
- The database schema: I've opted for a (key, value) table as that allows adding new stats without having to change the schema every time, which can be a pain.
- The method of collecting the data is very rudimentary, but to start with I didn't want to enter too much into Parsoid's core. There's a pretty good library to do this kind of metrics at https://github.com/s2js/probes , but I'm not sure how compatible it would be with our code…
- The data is passed by appending some new tags to the XML output, like
<perfstats>
  <perfstat type="time:parse">12345</perfstat>
</perfstats>

I'll appreciate comments and reviews :)
Comment 7 ssastry 2013-08-09 16:30:38 UTC
* The (key,value) setup is the right solution -- yes, we want the flexibility of adding new stats without changing schema.  I'll comment on specifics of the solution on the gerrit patch.

* Collecting easy-to-collect stats is a good start for now so we can test this approach.  There is no reason to instrument Parsoid's core till it becomes necessary.  Fine tracing of badly performing pages is more of a debugging exercise, for rt-testing, we want high-level numbers (parse, serialize, sizes, etc.)  If it became necessary, we could consider splitting the parse times into parsoid-code time and api-wait time, but I dont see it as a requirement now.

* IMO, probes are probably not necessary in rt-testing, but could be useful for perf. debugging or gathering finer grained metrics if desired.
Comment 8 Gerrit Notification Bot 2013-08-22 18:46:28 UTC
Change 78398 merged by jenkins-bot:
Record performance numbers during RT testing

https://gerrit.wikimedia.org/r/78398
Comment 9 Marc Ordinas i Llopis 2013-08-26 10:18:55 UTC
Additional work on perfstats UI will be tracked in a new bug or on IRC.
Comment 10 Gabriel Wicke 2013-08-26 18:06:25 UTC
The flexibility of key/value storage comes at the price of some storage (and probably access) efficiency:

-rw-rw---- 1 mysql mysql 232M Aug 24 20:44 perfstats.ibd
-rw-rw---- 1 mysql mysql 396M Aug 24 20:44 results.ibd

We might need to optimize this a bit at some point.
Comment 11 ssastry 2013-08-26 18:59:54 UTC
Actually, the perfstats table size can easily be reduced 2-3x with the following fixes to the schema:

1. Add an id field to the commits table
2. At least in the perfstats table (and possibly some or all others as well), replace commit_hash with a commit_id
3. Add a stat_keys(id, key) and replace the type field in the perfstats table with stat_key_id field.

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


Navigation
Links