Configure profiling and memory

When Itential Platform starts a service (application or adapter), the service loads its configuration data at startup. Service configuration for each application or adapter is managed in the Service Config editor in Admin Essentials.

This page covers service configuration for profiling logs and setting maximum memory size.

CPU profiling

Itential Platform has a built-in CPU profiler to help troubleshoot performance issues and high CPU usage. It is based on V8 profiling and Node.js simple profiling.

Profiling can be enabled for Itential Platform and select applications and adapters in release version 2020.1 and higher.

Do not enable profiling in production deployments. It may have a significant impact on performance.

Before you begin

You must have write permission to the working directory to create profiling logs.

Enable profiling for Itential Platform

In a Docker environment, set the following environment variable in /docker/startContainer:

$PHCORE_PROFILING=true

In a shell environment, use the --prof CLI option:

$sudo -u pronghorn node --prof server.js

Enable profiling for apps and adapters

1

Open Admin Essentials

Go to Admin Essentials.

2

Select the service

Expand the Applications or Adapters collection in the left sidebar and select the appropriate app or adapter.

3

Open the Service Config editor

From the Configuration tab, toggle Advanced View in the upper-right to display the Service Config editor.

4

Enable profiling

Edit the service configuration to enable profiling. The example below shows profiling enabled for NSO Manager:

1{
2 "profiling": true
3}
5

Save and restart

Click Save, then restart the application or adapter for the change to take effect.

Process profiler logs

The profiler writes data to a file in the working directory named isolate-*-v8.log.

To convert the log into a readable format, use the Node.js --prof-process CLI option:

$node --prof-process isolate-0x5589eb9afae0-v8.log > isolate-0x5589eb9afae0-v8-PRETTY.log

Open the resulting file in your preferred editor to inspect the profiling data.

Remove profiler logs

After analyzing the profiling data, delete the log files to reclaim disk space.

Maximum memory size

As memory consumption approaches its limit for a service process, use maxOldSpaceSize to increase the memory limit. Add it to systemProps in the service config by navigating to Admin Essentials > Applications > Configuration > Service Config.

PropertyTypeDefaultDescription
maxOldSpaceSizeInteger2048Sets the maximum memory size (in MB) of a service’s V8 old memory section. Defaults to 2 GB for all services except Workflow Engine, which defaults to 8 GB.

Sample configuration:

1"systemProps": {
2 "maxOldSpaceSize": 4095
3}