Page MenuHomePhabricator

Performance instrumentation in parsoid
Closed, ResolvedPublic


While Parsoid logs performance metrics during roundtrip testing, we don't have anything for the production cluster itself.

It would be useful to add instrumentation to different pieces of the parsoid pipeline for both wt2html and html2wt directions.

Once Parsoid is integrated with RESTbase, aggregate full-request numbers will also be logged there, but, finer-grained numbers for different stages would nevertheless be useful.

Completing this task will require figuring out some of the following:

  • How does this fit in with the editing performance metrics?
  • What pieces of the Parsoid pipelines need instrumentation?
  • Where to send perf events to?
  • What format / schema is needed by the perf event sink?
  • What node library / binding to use to help with the instrumentation?
  • What front-end is currently being used for performance visualization?

The Parsoid team can help with some of these questions.


Related Gerrit Patches:

Related Objects

Event Timeline

ssastry created this task.Dec 23 2014, 5:42 PM
ssastry raised the priority of this task from to Medium.
ssastry updated the task description. (Show Details)
ssastry added a project: Parsoid.
Qgil assigned this task to Memeht.Dec 23 2014, 6:03 PM
Qgil added a subscriber: Memeht.

Good news, @Memeht! @ssastry has prepared this task for the interim period until @Jdforrester-WMF is back. We are very conscious that you are not necessarily familiar with Parsoid, RESTbase, and our analytics infrastructure, but do not hesitate to ask here, and we will help you.

About instrumentation, @ssastry will know better than me how relevant this page is:

#mediawiki-parsoid is where you can find us. subbu (me), cscott, arlolra, marcoil, gwicke on irc (voiced members on the channel).

To provide some context:

  • Parsoid is set up to pre-generate content after each edit, so is not normally called when HTML for a given page and revision is needed in VE. Currently this is still implemented as a cache, but that is scheduled to be replaced by RESTBase storage next month. RESTBase emits graphite metrics for all entry points and backend requests, so we get bottom line metrics for both storage and Parsoid backend requests (see the 'restbase' hierarchy in graphite).
  • The part of Parsoid that is involved in the edit process is the html to wikitext serializer. This is also normally not in the critical path for saves as VE starts the conversion already when the user enters the edit summary, but it could be if the conversion takes longer.

@Memeht: I cannot reply to or access the Conpherence object that I got an email about .. so, responding here .. Please email me directly at Thanks.

I can definitely on Monday.

I could, perhaps later in the evening today, or over the weekend
sometime -- my schedule till Monday morning is dependent on others so I
cannot give you a firm time. However, if you give me a bunch of times
(or a time range that works for you) that you can talk this evening /
night or tomorrow morning, I'll try to make it happen one of those
times. I am on EST till Jan 3rd.

Did you want to do hangout, irc, phone .. ?


On 12/24/2014 07:50 PM, Memeht wrote:

Memeht added participants: ssastry, Memeht.
Memeht added a comment.

@ssastry: Do I need to get access to graphite for this project?

Qgil added a comment.Dec 29 2014, 10:36 AM

@ssastry, we are testing Conpherence in the context of the OPW-9 project. I just added you as member, so you should be available to use this Phabricator feature.

Also, @Memeht and I are meeting on a weekly basis on Mondays. I just added you to today's meeting as optional, just in case the schedule suits you.

@Qgil: thanks. As for today's chat, I won't be able to make it since I'll be on the way to catch a flight. However, Christy and I had a google hangout chat y'day where we touched base on this task and looks like she is all set to get going on it. We'll sync up on IRC as needed.

ssastry moved this task from Backlog to In Progress on the Parsoid board.Jan 12 2015, 7:51 PM
gerritbot added a subscriber: gerritbot.

Change 186219 had a related patch set uploaded (by Arlolra):
Add performance instrumentation and port node-txstatsd wrapper to Parsoid


Change 186219 merged by jenkins-bot:
Add perf. instrumentation and port node-txstatsd wrapper to Parsoid

Change 191475 had a related patch set uploaded (by Memeht):
Add txstatsd settings for beta labs and production


Change 191475 merged by jenkins-bot:
Add txstatsd settings for beta labs and production

ssastry moved this task from In Progress to Backlog on the Parsoid board.Mar 3 2015, 9:10 PM
ssastry closed this task as Resolved.Apr 2 2015, 5:23 PM
ssastry removed a project: Patch-For-Review.
ssastry set Security to None.