Service Config in the Itential Platform
  • 03 Dec 2024
  • Dark
    Light
  • PDF

Service Config in the Itential Platform

  • Dark
    Light
  • PDF

Article summary

When IAP starts a service (i.e, application or adapter), the service will load its configuration data for start-up. Enabling service_configs for each application or adapter is made from the Service Config editor in Admin Essentials.

This article presents service configuration for profiling logs and setting the maximum memory size.

Profiling Feature

To help troubleshoot performance issues resulting in high CPU usage, Itential Automation Platform (IAP) has a built-in profiler based on:

Profiling can be enabled in IAP, along with select applications and adapters in release version IAP/2020.1 and higher.

This feature should not impose any security limitations; however, Itential strongly recommends this feature is not enabled for production deployment due to possible performance impacts.

Prerequisites

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

Set profiling in IAP

When running IAP in a Docker environment, use the following to set profiling in the /docker/startContainer.

set `PHCORE_PROFILING=true`

When running IAP directly in shell, use the --prof CLI option.

sudo -u pronghorn node --prof server.js

Enable profiling for apps/adapters

To enable profiling for adapters and applications running on a development server:

  1. Go to Admin Essentials.
  2. Expand the Applications or Adapters collections menu (left sidebar)and select the appropriate adapter/application.
  3. From the Configuration tab, switch the toggle (upper-right) to turn-on the Advanced View and display the Service Config editor.
  4. Profiling of select applications/adapters can be enabled (and disabled) by directly editing its configuration (see example below).
  5. Once the profiling feature is enabled/disabled, click save and restart the application/adapter for the change to take effect.

Example: Profiling Enabled for NSO Manager

Shown below is an example of profiling enabled for the NSO Manager application.

01_profilingEnabled.png

Process profiler logs

The profiler will gather (log) all data in a file that can be found in the working directory as isolate-*-v8.log.

Example: Profiling Logs

02_outputLogs.png

To process the profiler logs into a user-friendly pretty-format, simply use the Node.js --prof-process CLI option.

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

Profiling info can then be inspected by opening the log file in your preferred editor/viewer.

Remove profiler logs

Once you've analyzed all profile data, remember to remove the profiling log files to save disk space.

System Props

System properties are used to control service level internal properties, such as V8 and node properties for a service process. System properties are set on the Service Config page (Applications and Adapters) by adding systemProps as a top level property.

Max Memory Size

As memory consumption approaches its limit for a service process, use maxOldSpaceSize to help increase the memory limit. The property can be added to systemProps by navigating to Admin Essentials → Applications → Configuration (tab)Service Config.

Property Type Default Description
maxOldSpaceSize Integer 2048 The maxOldSpaceSize property sets the maximum memory size (in MBs) of a service's process (V8 old memory section). This system property is set to 2 GB by default for all services except for Workflow Engine, which is set to 8 GB by default.

Sample Config

Below is a sample configuration set for maxOldSpaceSize in systemProps using the Advanced View (config editor).

"systemProps": {
  "maxOldSpaceSize": 4095
}

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.