ADMS Services Architecture Overview
There has been a significant architecture change in the backend services supporting ADMS functionality over the course of the NMS 2.6.0.1, 2.6.0.6, 25.12.0.0, and 25.12.0.1 releases.
On previous releases the main service implementing ADMS functionality was PFService, which was a significant bottleneck. There were frequent reports of busyness in PFService causing poor user experience.
Release 2.6.0.1 introduced the concept of PFService being split into separate mini services called: PFService, EMService, FLMService, FLTService, VVOService and DERMService. These services shared information via a shared memory segment. Whilst this achieved better division of labor and improved multi-tasking, it came at the price of complexity and significant increase in memory requirements for NMS instances.
From 2.6.0.6 onwards, the split services have been re-combined into a single process called: DMSService.
The evolution is that this process now spawns threads for tasks previously done by FLM, VVO, FLT, DERMs, PF and EM Services. The Shared Memory segment is retained as a fast re-start cache, but the complexity of shared locks amongst multiple processes has been removed. Additionally, memory requirements have been reduced as each service no longer separate copies of data.
The goal of the new architecture:
1. To improve the user experience and reduce the likelihood that user experienced delays due to system load.
2. To better leverage the multi-core / multi-cpu architectures and make better use of parallel processing.
3. To reduce system startup time.
User Experience: The new architecture de-couples responding to user requests from the background processing of information. For example, FLM cyclical solves are performed in a background task; when a user requests powerflow results on a specific device this is obtained via read-only access to available data, rather than waiting for the background calculations to free up to respond to user requests.
Multi-tasking: By utilizing more threads and multi-core architectures up DMSService can more efficiently multi-task; supporting improved parallel processing via additional CPUs.
Reduce startup time: By keeping model data in a shared memory segment, services do not need to load data from the database to create their models. If the shared memory segment already exists a (re-)starting service can simply attach to it. The only time the database needs to be queried is on a re-start that comes after the shared memory has been removed or the DMSService binary has changed (which should automatically remove the shared memory segments).
Shared Memory
The shared memory segments consist of the following data:
Model: Static model data. The set of all devices in the network and their attributes for powerflow calculations. For example, every switch, it’s ratings and nominal status (open/close) is recorded here. This segment is updated when model build and model edits occur.
Load/Dist Gen profiles: Load and distributed generation profiles that drive powerflow calculations. Updated on demand when a new set of load profile data needs to be ingested into the ADMS - typically weekly or monthly.
Heartbeat and Global config: Relatively tiny sized data stores used to properly coordinate behavior between the individual (split) ADMS services.
The shared memory segments can be checked with following tool:
nms-shm
By default, this will list the shared memory resources on a machine that are relevant to the NMS env where nms-shm is executed.
The shared memory segments can be cleared with:
nms-shm -remove
This removes all shared memory segments, so that they will get re-created on service start. This command should never be executed on a running NMS system. A full ADMS service restart is needed after executing this command. The “remove” command is run automatically during an nms-setup to make sure that there is no stale data in the shared-memory segments.