> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/hypersim/simulation-control-monitoring-and-logging/use-hypersim-built-in-tools/analyze-performance.md).

# Analyze Performance with RT Monitor

## Analyze performance post-simulation

After a simulation is stopped, a performance report is generated in the **simulation log file** (.simout). This report provides additional timing information that complements the data displayed in the **RT Monitor**.

As shown in the figure below, the report includes two categories of timing measurements:

* **Timings measured during the simulation relative to the main core**
* **Timings measured during the simulation relative to a specific core**

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-8bc32a35937b38c14e35a75bddff44b9e186bc29%2Fperformance-post-simulation.png?alt=media" alt=""><figcaption></figcaption></figure>

| Monitoring information      | Description                                                                                                                                       |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Average simulation step** | Total simulation time divided by the number of steps. In real-time, the value displayed must be very close to the time step.                      |
| **Wait for next step**      | Equivalent to the "remain" value given by the RT monitor, i.e. waiting time for real-time synchronization followed by inter-core synchronization. |

**For each runner, the following information is displayed**

| Monitoring information | Description                                                                                                                                         |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **begin**              | Time spent on the IO exchangers initialization.                                                                                                     |
| **inputs**             | Time spent pulling data from IO exchangers. This time is analogous to the RT monitor **IO in** value.                                               |
| **outputs**            | Time spent pushing data to IO exchangers. This time is analogous to the RT monitor **IO out** value.                                                |
| **step**               | Time spent between IO exchanges and simulation execution. This time is not analogous to the RT monitor **exec** value, as it includes IO exchanges. |

## Use the RT Monitor tool

The **RT Monitor** tool enables users to **monitor simulation performance in real time**. Each simulation time step is divided into several execution phases, for which precise timing information is continuously measured and displayed.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-71e40e04ff6f7f0432d44abc4fb2d8d772a5beb4%2Frt-monitor-timing.png?alt=media" alt=""><figcaption><p>The timings measured during the simulation, at each time step:</p></figcaption></figure>

This detailed visibility into execution times is particularly valuable for performance optimization, bottleneck identification, and debugging.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-df20b30af6d299d757d36f1a0aa8ff1b2a9c8d23%2FRT-monitor.png?alt=media" alt=""><figcaption></figcaption></figure>

The tab is separated into 2 sections:

* The left section with Hardware resources
* The right section with CPU Monitoring

### Hardware usage information <a href="#hardware-usage-information" id="hardware-usage-information"></a>

* **Displays the core affinity matrix.** This view is primarily useful for large models running on PC clusters, where the physical distance between cores can have a noticeable impact on performance.
* **Reserves cores for exclusive use** by a single user, or releases them when they are no longer needed.
* **Forces the release of a core** currently being used by another user.
* **Expands or collapses** the information tree displayed in section (7).
* **Refreshes core usage information** to display the latest status.
* **Filters the list of cores** shown in section (7).
* **Displays the list of licensed cores**, along with detailed information about their specifications and current usage.

{% hint style="info" %}
Since multiple users can access the same target simulator, it's important to keep track of who is using what resources.
{% endhint %}

### CPU monitoring <a href="#cpu-monitoring" id="cpu-monitoring"></a>

**Monitor the performance of all simulation cores in real time** to help answer key questions such as:

* Are any overruns or stretched steps occurring?
* What is the actual execution time?
* How much idle time is available on each core?

Controls and information include:

* **Select or deselect all cores** to be monitored.
* **Choose which categories of metrics** are displayed.
* **Perform a single acquisition** or enable **continuous monitoring**.
* **Reset timing or performance statistics**.
* **View monitored metrics for each core**.
* **Add or remove metrics** from the monitoring table (see the complete list below).

{% hint style="info" %}
All times displayed in the Performance Monitoring tab are in **microseconds**.

The max and min values are common to all CPUs reserved by HYPERSIM. In addition, the stretched steps value is incremented in a unique CPU task, the main task.
{% endhint %}

<table data-search="false"><thead><tr><th width="180">Value</th><th>Description</th></tr></thead><tbody><tr><td><strong>Select</strong></td><td>Uncheck to disable monitoring on the corresponding core</td></tr><tr><td><strong>Id</strong></td><td>Core number</td></tr><tr><td><strong>Enabled</strong></td><td>Core state</td></tr><tr><td><strong>Exec</strong></td><td>The execution time of simulation tasks during the monitored time step</td></tr><tr><td><strong>Exec Max</strong></td><td>The maximum execution time of simulation tasks, since monitoring start or last reset</td></tr><tr><td><strong>Remain</strong></td><td>Remaining idle time after all actions have been executed and before the next step, sum of waiting and synchronization times</td></tr><tr><td><strong>Remain Min</strong></td><td>Minimum remaining idle time, since monitoring start or last reset</td></tr><tr><td><strong>Comm</strong></td><td>Time used for communication between cores</td></tr><tr><td><strong>Comm Min</strong></td><td>Minimum time used for communication between cores since monitoring start or last reset</td></tr><tr><td><strong>Comm Max</strong></td><td>Maximum time used for communication between cores since monitoring start or last reset</td></tr><tr><td><strong>Sync</strong></td><td>Time spent in the inter-core synchronization barrier</td></tr><tr><td><strong>Sync Min</strong></td><td>Minimum synchronization time, since monitoring start or last reset</td></tr><tr><td><strong>Sync Max</strong></td><td>Maximum synchronization time, since monitoring start or last reset</td></tr><tr><td><strong>Wait</strong></td><td>Time waiting for real-time synchronization</td></tr><tr><td><strong>Wait Min</strong></td><td>Minimum wait time, since monitoring start or last reset</td></tr><tr><td><strong>Wait Max</strong></td><td>Maximum wait time, since monitoring start or last reset</td></tr><tr><td><strong>Sim</strong></td><td>Complete simulation time step measurement</td></tr><tr><td><strong>Sim Min</strong></td><td>The minimum duration of the time step, since monitoring start or last reset</td></tr><tr><td><strong>Sim Max</strong></td><td>The maximum duration of the time step, since monitoring start or last reset</td></tr><tr><td><strong>Acq/Par</strong></td><td>Simulation server request handling time (e.g. signal acquisition and parameter change)</td></tr><tr><td><strong>Acq/Par Max</strong></td><td>Maximum simulation server request handling time, since monitoring start or last reset</td></tr><tr><td><strong>IO Out</strong></td><td>Outbound I/O service time (analog, digital and various communication protocols)</td></tr><tr><td><strong>IO Out Max</strong></td><td>Maximum I/O outbound service time, since monitoring start or last reset</td></tr><tr><td><strong>IO In</strong></td><td>Inbound I/O service time (analog, digital and various communication protocols)</td></tr><tr><td><strong>IO In Max</strong></td><td>Maximum I/O inbound service time, since monitoring start or last reset</td></tr><tr><td><strong>Missed I/O Adp1</strong></td><td><em>Legacy.</em> Number of steps where I/O adapter 1 could not service I/Os properly, since simulation start or last reset</td></tr><tr><td><strong>Missed I/O Adp2</strong></td><td><em>Legacy.</em> Number of steps where I/O adapter 2 could not service I/Os properly, since simulation start or last reset</td></tr><tr><td><strong>Last in Sync</strong></td><td>The number of times the core arrived last in the synchronization barrier, since simulation start or last reset. The master core always arrives last under normal operation.</td></tr><tr><td><strong>Stretched Step</strong></td><td>The number of steps where execution delays could not be compensated in the following step, since simulation start or last reset.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/hypersim/simulation-control-monitoring-and-logging/use-hypersim-built-in-tools/analyze-performance.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
