> This page is for Itential Platform On-Prem, version 6 (default).
> For other versions, use one of these documentation indexes:
> - 6 (default): https://docs.itential.com/itential-platform/6/llms.txt
> - 2023.2: https://docs.itential.com/itential-platform/2023-2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# Build a baseline and assess capacity

> Record 30 days of normal job and task demand and host headroom, then use a decision matrix to choose between tuning worker settings, adding Platform nodes, or investigating another cause.

Before you start, complete the [prerequisites](/itential-platform/monitor/job-capacity/prepare#prerequisites) and confirm every exporter target is up.

## Collect your baseline

Itential doesn't publish job thresholds, so you collect 30 days of your own data first. Thirty days evens out weekly cycles. You tune every job alert from it.

> **Warning**
>
> The baseline comes from Prometheus, not from job history in MongoDB. The exporters don't backfill earlier activity, so the baseline starts when you install them. Wait for 30 days of representative data, including month-end or other peaks, before you turn on demand-based alerts.
>
> The alert rules compute the baseline from their own recorded data, which starts the day you load them. Load the rules file at the start of this phase, without connecting Alertmanager, and keep at least 35 days of retention. Use production data with no gaps from exporter outages or Prometheus data loss. Until 30 days have passed, treat the baseline as provisional. With short history, the rules report demand as within baseline, so read the within-baseline alerts as "host CPU is high, cause unknown". To alert on demand sooner, [use a fixed p99](/itential-platform/monitor/job-capacity/notify#use-a-fixed-p99).

If you can't wait, estimate the values from Operations Manager job history, and enter them as the fixed p99 for the demand alerts. Replace them when you have 30 days of data.

#### Set the range

Set the dashboard range to the last 30 days and the **Node** filter to **All**.

#### Record the starting baseline

Record the five values in the following table in your runbook.

#### Load the rules file

Load the [decision-matrix rules file](/itential-platform/monitor/job-capacity/notify#load-the-decision-matrix-rules) now, without connecting Alertmanager, so the recording rules collect the same 30 days. Refresh the baseline each quarter.

The values are [percentiles](/itential-platform/monitor/job-capacity/prepare#read-the-dashboard) over the last 30 days. Read the p50 and p99 values from the dashboard. The dashboard doesn't show p95, so run the matching query after the table for the CPU rows. You can also run any query to check a dashboard value.

| Value                                                                      | Where to find it                                                                           | What it tells you                                                                                                                                                                                                                                                                                                                            |
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Typical busy minute, jobs, p50                                             | **Workflow Engine**, **Jobs Started per Minute**                                           | Normal demand.                                                                                                                                                                                                                                                                                                                               |
| Heavy busy minute, jobs, p99                                               | **Workflow Engine**, **Jobs Started per Minute**                                           | The level for the demand alert.                                                                                                                                                                                                                                                                                                              |
| Heavy busy minute, tasks, p99                                              | **Workflow Engine**, **Tasks Started per Minute**                                          | Task load at peak. Check Workflow Engine CPU during those minutes.                                                                                                                                                                                                                                                                           |
| Host CPU, p95, busiest host                                                | **Overview**, **Node CPU Busy %**. Use the query for the p95.                              | Headroom on the busiest host. The value includes idle time, so it can hide short bursts. Also note the highest value on the **Node CPU Busy %** panel over the same 30 days.                                                                                                                                                                 |
| Workflow Engine CPU, p95, as a percent of its thread ceiling, busiest node | **Platform Process**, **Top Applications and Adapters by CPU**. Use the query for the p95. | Worker saturation on the busiest node. The query divides by `1`, the default thread count. Replace it with your `task_worker_thread_count`. The value includes idle time, so it can hide short bursts. Also note the highest value on the **Top Applications and Adapters by CPU** panel over the same 30 days, divided by the thread count. |

For example:

* A typical busy minute p50 of 4 means a typical busy minute starts four jobs.
* A heavy busy minute p99 of 40 sets the demand alert at 1.5 × 40 = 60 jobs a minute.
* A heavy busy minute p99 of 600 tasks means the busiest 1% of minutes start 600 or more tasks.
* A host CPU p95 of 55 means the busiest host stays at or below 55% for 95% of the 30 days, which leaves room before the 70% warning tier. A value of 78 is inside the 70% to 85% warning band, with little room to grow.
* A Workflow Engine CPU p95 of 40 means the Workflow Engine has spare capacity. A value of 95 means it is close to its thread ceiling, so more tasks queue instead of run faster.

The following queries use PromQL. In a different stack, run the equivalent query over the same metrics and the same 30-day window.

Typical busy minute, jobs:

```promql
quantile_over_time(0.5, (sum(increase(itential_job_start[1m])) > 0)[30d:1m])
```

Heavy busy minute, jobs:

```promql
quantile_over_time(0.99, (sum(increase(itential_job_start[1m])) > 0)[30d:1m])
```

Heavy busy minute, tasks:

```promql
quantile_over_time(0.99, (sum(increase(itential_task_start[1m])) > 0)[30d:1m])
```

Host CPU, p95, busiest host:

```promql
quantile_over_time(0.95, (max(100 - avg by (instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100))[30d:5m])
```

Workflow Engine CPU, p95, as a percent of its thread ceiling. Replace `1` with your thread count:

```promql
quantile_over_time(0.95, (max(100 * sum by (instance) (rate(namedprocess_namegroup_cpu_seconds_total{groupname="Pronghorn WorkFlowEngine Application"}[5m])) / 1))[30d:5m])
```

Also record your current `task_worker_thread_count` and `task_worker_rate_limit`, so you know where tuning starts.

> **Info**
>
> Prometheus 3 shows the notice "metric might not be a counter, name does not end in \_total" for the `itential_*` counters. The notice is informational. The exporter names its counters without `_total`, and `rate()` and `increase()` still work.

### Record the other recommended metrics

Record a 30-day p95 value for each of the following metrics. Use them later to set alert thresholds. Each metric has its own query. Exporter metric names vary by version, so confirm each name in Prometheus first.

**Redis queue latency, in ms**

Queue health against the 1 ms and 10 ms tiers. A value of 0.4 is healthy. A value of 3 is above the warning tier.

```promql
quantile_over_time(0.95, (1000 * sum(rate(redis_commands_duration_seconds_total{cmd=~"rpoplpush|zpopmin|zadd|xadd|lpush|rpush"}[5m])) / clamp_min(sum(rate(redis_commands_total{cmd=~"rpoplpush|zpopmin|zadd|xadd|lpush|rpush"}[5m])), 0.000001))[30d:5m])
```

**MongoDB reads per second**

Database read load. A value of 800 means reads stay at or below 800 a second for 95% of the 30 days. Compare it with job demand to see how reads grow with load.

```promql
quantile_over_time(0.95, sum(rate(mongodb_op_counters_total{type=~"query|getmore"}[5m]))[30d:5m])
```

**MongoDB writes per second**

Write load from job and task documents. A value of 300 means writes stay at or below 300 a second. If writes double while job starts stay flat, workflows have become heavier.

```promql
quantile_over_time(0.95, sum(rate(mongodb_op_counters_total{type=~"insert|update|delete"}[5m]))[30d:5m])
```

**Network I/O per host, in Mbit/s**

Network headroom on the busiest host. A value of 120 on a 1 Gbit/s link is about 12% used, which leaves plenty of room. A value of 800 is close to the link limit.

```promql
quantile_over_time(0.95, (max(sum by (instance) (rate(node_network_receive_bytes_total{device!="lo"}[5m]) + rate(node_network_transmit_bytes_total{device!="lo"}[5m]))) * 8 / 1e6)[30d:5m])
```

**Disk IOPS per host**

Disk headroom, most important on MongoDB hosts. A value of 1,500 against a volume rated for 3,000 IOPS is half the rated limit. Near the rating, database latency rises.

```promql
quantile_over_time(0.95, (max(sum by (instance) (rate(node_disk_reads_completed_total[5m]) + rate(node_disk_writes_completed_total[5m]))))[30d:5m])
```

**Gateway server and NSO server CPU**

Downstream headroom. A value of 85 means tasks waiting on the server might slow down even while Platform is idle. Replace `<gateway-or-nso-hosts>` with a regex for those servers' `instance` labels.

```promql
quantile_over_time(0.95, (100 - avg by (instance) (rate(node_cpu_seconds_total{mode="idle",instance=~"<gateway-or-nso-hosts>"}[5m])) * 100)[30d:5m])
```

**Gateway server and NSO server memory**

Downstream memory headroom. A value of 60 leaves room. A value of 90 risks swapping or out-of-memory errors under a burst. Replace `<gateway-or-nso-hosts>` as you did for CPU.

```promql
quantile_over_time(0.95, (100 * (1 - node_memory_MemAvailable_bytes{instance=~"<gateway-or-nso-hosts>"} / node_memory_MemTotal_bytes{instance=~"<gateway-or-nso-hosts>"}))[30d:5m])
```

**Host memory used**

Memory headroom against the 75%, 85%, and 95% tiers. A value of 60 leaves room before the 75% warning tier. A value of 80 is past the warning tier at peak. Replace `<itential-hosts>` with a regex for your Platform servers.

```promql
quantile_over_time(0.95, (max(100 * (1 - node_memory_MemAvailable_bytes{instance=~"<itential-hosts>"} / node_memory_MemTotal_bytes{instance=~"<itential-hosts>"})))[30d:5m])
```

**Pronghorn Core CPU, as percent of one core**

Headroom on the main thread that worker threads can't help. A value of 40 is spare capacity. A value of 90 means Pronghorn Core is near its limit, so reduce API and trigger load or add Platform nodes.

```promql
quantile_over_time(0.95, (max(100 * sum by (instance) (rate(namedprocess_namegroup_cpu_seconds_total{groupname="Pronghorn Core"}[5m]))))[30d:5m])
```

**Workflow Engine memory, in GB**

A value of 1.5 is 1.5 GB at peak, well within host memory. A value that climbs week over week at the same job volume points to heavier workflows or a leak.

```promql
quantile_over_time(0.95, (max(sum by (instance) (namedprocess_namegroup_memory_bytes{groupname="Pronghorn WorkFlowEngine Application",memtype="resident"})) / 1e9)[30d:5m])
```

## Assess capacity

After you record the baseline, assess capacity from two things together: how much work arrives and how much headroom is left. Neither needs a job or task to finish.

* **Demand** is above baseline when jobs or tasks started per minute exceed 1.5 times the 30-day p99.
* **Host CPU** shows how much capacity the server has left.
* **Workflow Engine CPU** shows whether the workers are the ceiling. It's `100 × Workflow Engine CPU cores ÷ task_worker_thread_count`, so 100% means every worker thread uses a full core.

A busy Node.js process reaching 100% for a few minutes is normal. Act on Workflow Engine CPU only when it stays at 90% or more for 15 minutes. Between 70% and 90%, watch the trend.

### Decision matrix

| Demand          | Host CPU  | Workflow Engine CPU, % of thread ceiling, sustained 15 min | Meaning                                                                         | Action                                                                                                                                                                         |
| --------------- | --------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Above baseline  | Above 85% | Any                                                        | Out of compute under load.                                                      | Reduce load or add Platform nodes. Don't raise threads. Look for unwanted processes.                                                                                           |
| Above baseline  | Below 70% | 90% or more                                                | Workers are saturated and the host has spare cores.                             | Raise `task_worker_thread_count` by one, then confirm host CPU stays below 80%. At four threads, add Platform nodes.                                                           |
| Above baseline  | Below 70% | Below 70%                                                  | The host and workers have headroom. The limit is elsewhere.                     | If jobs are slow, check `task_worker_rate_limit` and raise it a small step, then check Redis queue latency and downstream systems. Threads won't help.                         |
| Within baseline | Above 85% | 90% or more                                                | The Workflow Engine and other Platform processes drive CPU without more demand. | Find the workflows behind the task load and recent changes. Don't raise threads yet.                                                                                           |
| Within baseline | Above 85% | Below 75%                                                  | Something other than the Workflow Engine uses CPU.                              | Find the process, such as Pronghorn Core, an adapter, or MongoDB, and any recent change.                                                                                       |
| Within baseline | Above 85% | 75% to 90%                                                 | The Workflow Engine and other Platform processes share the load.                | Compare each process's share on the **Platform Process** tab and start with the heavier one: workflows if it is the Workflow Engine, otherwise the process or a recent change. |
| Within baseline | Below 70% | 90% or more                                                | A busy Workflow Engine, not necessarily a saturated one.                        | No action unless jobs are slow. If they are, raise threads by one or lower the rate limit. Change one setting at a time.                                                       |
| Within baseline | Below 70% | Below 70%                                                  | Healthy.                                                                        | None.                                                                                                                                                                          |

### Compare processes

Host CPU shows how much capacity the server has left. Per-process CPU shows whether one process is the ceiling. Read both.

* A Node.js process runs on one main thread, so one process rarely exceeds about one core.
* The Workflow Engine runs the task worker threads, so with `task_worker_thread_count` set to `4`, its ceiling is about 400% of one core. Divide by the thread count before you compare with the tiers.

The decision matrix and the alert rules read Workflow Engine CPU as a percent of its thread ceiling. The dashboard panel shows a percent of one core, so convert before you compare:

| Threads | 70% of the ceiling | 90% of the ceiling |
| ------- | ------------------ | ------------------ |
| 1       | 70% of one core    | 90% of one core    |
| 2       | 140% of one core   | 180% of one core   |
| 4       | 280% of one core   | 360% of one core   |

| What you see                                                                      | What it means                                                    | What to do                                                                                                                                                      |
| --------------------------------------------------------------------------------- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Workflow Engine at 90% or more of its thread ceiling, host CPU below 70%          | The workers are saturated and the host has spare cores.          | Raise the thread count by one if demand is above baseline. At four threads, add Platform nodes.                                                                 |
| Workflow Engine at 70% to 90% of its thread ceiling, host CPU low                 | Busy but not saturated. This is the watch zone.                  | Watch the trend, and act only if jobs are slow.                                                                                                                 |
| Workflow Engine below 70% of its thread ceiling while jobs are slow, host CPU low | The workers have room, so the limit is elsewhere.                | Check `task_worker_rate_limit`, how many jobs run at once, Redis queue latency, and downstream systems. A rate limit of `0` means off. More threads won't help. |
| Pronghorn Core above 85% of one core, Workflow Engine low                         | The Core main thread is the limit. Worker threads can't help it. | Reduce API and trigger load, or add Platform nodes.                                                                                                             |
| Nothing is slow                                                                   | A busy process, not a saturated one.                             | No action. Read Workflow Engine CPU as a percent of its thread ceiling, not of one core.                                                                        |

Per-process CPU, as a percent of one core:

```promql
100 * sum by (groupname) (rate(namedprocess_namegroup_cpu_seconds_total{groupname=~"Pronghorn (WorkFlowEngine Application|Core)"}[5m]))
```

Workflow Engine CPU as a percent of its thread ceiling, busiest node. Replace `1` with your thread count.

```promql
max(100 * sum by (instance) (rate(namedprocess_namegroup_cpu_seconds_total{groupname="Pronghorn WorkFlowEngine Application"}[5m])) / 1)
```

Which thread is busy:

```promql
sum by (groupname, threadname) (rate(namedprocess_namegroup_thread_cpu_seconds_total{groupname=~"Pronghorn (WorkFlowEngine Application|Core)"}[10m]))
```

Before you change anything, find out whether anyone sees slow jobs. High process CPU with healthy Redis queue latency and normal API latency is a busy process, not a saturated one.

## Next steps

* [Set up alerts](/itential-platform/monitor/job-capacity/notify)