How to analyze Node.JS running processes on Azure Web APP


Node.JS Parser for Node.JS 0.10.32 32bit is included in Azure Web App Diagnostic Service now.

If you have Node.JS 0.10.32 32bit running, and want to quick analyze its running status, open https://<appname>.scm.azurewebsites.net/support

Click the Analyze menu, click Diagnostics, and then click Diagnose Now:

clip_image002

The parser is developed to analyze Node.JS slow performance issue or understand process running status at given time. It works as analyzing Node.exe directly and generating diagnostic report for it. Currently it supports the default Node.JS version on Azure Web APP (0.10.32 X86) with multiple instances.

After report generated, download the report zip file and unzip it.

Note: To analyze other Node.JS versions which are not supported in DaaS yet, please check:

http://blog.freistli.com/2016/03/09/node-js-diagnoser-site-extension-for-azure-web-app-is-ready/

There is is a HTML report. To quick go through the report, click the report link in the index page index.xhtml:

clip_image004

Then in the detailed report page, click the Menu items on left pane

clip_image006

The report information includes:

Node.exe Process Summary

On the Process section, you can hover mouse cursor around counters, it can give more explanations in tooltip

clip_image008

Threads Running Time

This lists all thread running time in User Mode

clip_image009

Running HTTP Request

If the main thread runs a HTTP Request, it will dump out URL and Query information.

clip_image010

JavaScript call stack on Threads

Node.JS executes sync tasks on one single main thread. If there is any JavaScript code running on the single main thread, the report will parser the JavaScript call stack as below:

clip_image012

For the call frame which runs JavaScript function, click the Hyperlink of the call frame number, the function source code will be displayed and rendered with JavaScript Syntax:

clip_image014

Native C/C++ and JS Stack Traces on Threads

This gives you a complete view for all running call frames on each thread, not only JavaScript, but also native calls (such as Node and V8 modules). Regarding the thread which contains JavaScript frames, it also shows Arguments object list for each JS frame.

clip_image016

Active Handles in Async Queue

Node.JS supports async calls. It is possible that all threads don’t explicitly execute JavaScript tasks on call stacks, but many async tasks are pending executing or waiting for callback. The pending async tasks associate active handles in the async queue (a double link structure). By looking at the handles and related objects we can know the nature of those async tasks and then perform necessary tuning.

This section gives latest 100 active handles and wrapped objects info:

clip_image018

Click the hyperlink of the object address, it displays the Object properties:

clip_image020

Memory Usage

This part provides a flat memory usage summary from different memory category:

clip_image022

 

Thanks,

Freist Li


Comments (0)

Skip to main content