NOTE
StrongLoop Arc and slc are no longer under active development, and will soon be deprecated. Arc's features are being included in the IBM API Connect Developer Toolkit: Please use it instead.
Skip to end of metadata
Go to start of metadata

Icon

Smart profiling is supported only for applications running on Linux x86_64 systems with:

  • StrongLoop Arc version 1.6.6+
  • StrongLoop Process Manager 5.0.1+

You don't get a free 30-day trial license for Smart Profililng, as you do for other features. To try it out, please email slsales@us.ibm.com.

Use Smart Profiling to start CPU profiling automatically when the Node event loop stalls.  

Icon

For a sample application to demonstrate Smart Profiling in action, see https://github.com/strongloop/smartprofiling-example-app.

For a tutorial-style introduction to Smart Profiling, see Node.js Smart Profiling Using StrongLoop Arc.

Click Profiler in the Arc launchpad or module selector.

In Arc Profiler, follow these steps:

  1. In the Hostname field, enter the name of a Linux host where StrongLoop Process Manager (PM) is running.
  2. In the Port field, enter the port number where StrongLoop PM is listening.
  3. Click Load.
    Arc will display the process IDs (PIDs) of the application running in that PM.
  4. Select the PIDs for which you want to set smart profiling.
  5. Click Profile Settings (full).  You'll see the Profiler Settings dialog:
  6. Click Smart to enable smart profiling.
  7. In the Event Loop Execution Threshold field, enter the number of milliseconds after which profiling will start. If the Node event loop stalls for longer than this, then smart profiling starts automatically.
  8. In the Max Samples field, enter the maximum number of event loop cycles during which to profile.
  9. Click OK to close the Profiler Settings dialog and save the settings.
  10. Click the desired PID on which to do Smart Profiling; the PID box will turn blue.
  11. Click Start to begin Smart Profiling.
    To end Smart Profiling, click Stop

NOTE: StrongLoop Profiler will save CPU profiles after you set the Smart Profiling settings and click Start; and before you click Stop.

To disable smart profiling:

  1. Click Full.
  2. Click OK.

Icon

Arc lists generated profiles on the left of the Profiler module. Click on a profile to view it.

The profile files are saved on the system where PM is running in the .strong-pm subdirectory in the home directory of the user running PM (~/.strong-pm). The file names are:

  • CPU profiles: profile.1.cpuprofile, profile.2.cpuprofile, profile.3.cpuprofile, and so on.
  • Heap snapshots: profile.1.heapsnapshot, profile.2.heapsnapshot, profile.3.heapsnapshot, and so on.