Skip to content

Commit 86d95e6

Browse files
committed
prepare for 3.13.0 release
Signed-off-by: Harper, Jason M <[email protected]>
1 parent 206e4af commit 86d95e6

File tree

2 files changed

+85
-43
lines changed

2 files changed

+85
-43
lines changed

README.md

Lines changed: 84 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,25 @@ Intel&reg; PerfSpect is a command-line tool designed to help you analyze and opt
99
We welcome bug reports and enhancement requests, which can be submitted via the [Issues](https://github.com/intel/PerfSpect/issues) section on GitHub. For those interested in contributing to the code, please refer to the guidelines outlined in the [CONTRIBUTING.md](CONTRIBUTING.md) file.
1010

1111
## Getting PerfSpect
12+
1213
Pre-built PerfSpect releases are available in the repository's [Releases](https://github.com/intel/PerfSpect/releases). Download and extract perfspect.tgz.
13-
```
14+
15+
```text
1416
wget -qO- https://github.com/intel/PerfSpect/releases/latest/download/perfspect.tgz | tar -xvz
1517
cd perfspect
1618
```
19+
1720
## Running PerfSpect
21+
1822
PerfSpect includes a suite of commands designed to analyze and optimize both system and software performance.
19-
<pre>
23+
24+
```text
2025
Usage:
2126
perfspect [command] [flags]
22-
</pre>
27+
```
2328

2429
### Commands
30+
2531
| Command | Description |
2632
| ------- | ----------- |
2733
| [`metrics`](#metrics-command) | CPU core and uncore metrics |
@@ -36,71 +42,82 @@ Usage:
3642
> Run `perfspect [command] -h` to view command-specific help text.
3743
3844
#### Metrics Command
45+
3946
The `metrics` command generates reports containing CPU architectural performance characterization metrics in HTML and CSV formats. Run `perfspect metrics`.
4047

4148
![screenshot of the TMAM page from the metrics command HTML report, provides a description of TMAM on the left and a pie chart showing the 1st and 2nd level TMAM metrics on the right](docs/metrics_html_tma.png)
4249

4350
##### Live Metrics
51+
4452
The `metrics` command supports two modes -- default and "live". Default mode behaves as above -- metrics are collected and saved into report files for review. The "live" mode prints the metrics to stdout where they can be viewed in the console and/or redirected into a file or observability pipeline. Run `perfspect metrics --live`.
4553

4654
![screenshot of live CSV metrics in a text terminal](docs/metrics_live.png)
4755

4856
##### Metrics Without Root Permissions
57+
4958
If neither sudo nor root access is available, an administrator must apply the following configuration to the target system(s):
59+
5060
- sysctl -w kernel.perf_event_paranoid=0
5161
- sysctl -w kernel.nmi_watchdog=0
5262
- write '125' to all perf_event_mux_interval_ms files found under /sys/devices/*, for example, `for i in $(find /sys/devices -name perf_event_mux_interval_ms); do echo 125 > $i; done`
5363

5464
Once the configuration changes are applied, use the `--noroot` flag on the command line, for example, `perfspect metrics --noroot`.
5565

5666
##### Refining Metrics to a Specific Time Range
67+
5768
After collecting metrics, you can generate new summary reports for a specific time interval using the `metrics trim` subcommand. This is useful when you've collected metrics for an entire workload but want to analyze only a specific portion, excluding setup, teardown, or other unwanted phases.
5869

5970
The time range can be specified using either absolute timestamps (seconds since epoch) or relative offsets from the beginning/end of the data. At least one time parameter must be specified.
6071

6172
The trimmed CSV and HTML summary files will be placed in a new output directory. The output directory can be specified using the `--output` flag.
6273

6374
**Examples:**
64-
<pre>
75+
76+
```text
6577
# Skip the first 10 seconds and last 5 seconds
6678
$ ./perfspect metrics trim --input perfspect_2025-11-28_09-21-56 --start-offset 10 --end-offset 5
6779
6880
# Use absolute timestamps (seconds since epoch)
6981
$ ./perfspect metrics trim --input perfspect_2025-11-28_09-21-56 --start-time 1764174327 --end-time 1764174351
70-
</pre>
82+
```
7183

7284
##### Prometheus Endpoint
85+
7386
The `metrics` command can expose metrics via a Prometheus compatible `metrics` endpoint. This allows integration with Prometheus monitoring systems. To enable the Prometheus endpoint, use the `--prometheus-server` flag. By default, the endpoint listens on port 9090. The port can be changed using the `--prometheus-server-addr` flag. Run `perfspect metrics --prometheus-server`. See the [example daemonset](docs/perfspect-daemonset.md) for deploying in Kubernetes.
7487

7588
See `perfspect metrics -h` for the extensive set of options and examples.
7689

7790
#### Report Command
91+
7892
The `report` command generates system configuration reports in a variety of formats. All categories of information are collected by default. See `perfspect report -h` for all options.
7993

8094
![screenshot of a small section of the HTML report from the report command](docs/report_html.png)
8195

8296
It's possible to report a subset of information by providing command line options. Note that by specifying only the `txt` format, it is printed to stdout, as well as written to a report file.
83-
<pre>
97+
98+
```text
8499
$ ./perfspect report --bios --format txt
85100
BIOS
86101
====
87102
Vendor: Intel Corporation
88103
Version: EGSDCRB1.SYS.1752.P05.2401050248
89104
Release Date: 01/05/2024
90-
</pre>
105+
```
91106

92107
#### Benchmark Command
108+
93109
The `benchmark` command runs performance micro-benchmarks to evaluate system health and performance characteristics. All benchmarks are run by default unless specific benchmarks are selected. A brief system summary is included in the output by default.
94110

95111
> [!IMPORTANT]
96112
> Benchmarks should be run on idle systems to ensure accurate measurements and to avoid interfering with active workloads.
97113
98114
**Examples:**
99-
<pre>
100-
$ ./perfspect benchmark # Run all benchmarks with system summary
101-
$ ./perfspect benchmark --speed --power # Run specific benchmarks
102-
$ ./perfspect benchmark --no-summary # Exclude system summary from output
103-
</pre>
115+
116+
```text
117+
./perfspect benchmark # Run all benchmarks with system summary
118+
./perfspect benchmark --speed --power # Run specific benchmarks
119+
./perfspect benchmark --no-summary # Exclude system summary from output
120+
```
104121

105122
See `perfspect benchmark -h` for all options.
106123

@@ -109,50 +126,62 @@ See `perfspect benchmark -h` for all options.
109126
| speed | runs each [stress-ng](https://github.com/ColinIanKing/stress-ng) cpu-method for 1s each, reports the geo-metric mean of all results. |
110127
| power | runs stress-ng to load all cpus to 100% for 60s. Uses [turbostat](https://github.com/torvalds/linux/tree/master/tools/power/x86/turbostat) to measure power. |
111128
| temperature | runs the same micro benchmark as 'power', but extracts maximum temperature from turbostat output. |
112-
| frequency | runs [avx-turbo](https://github.com/travisdowns/avx-turbo) to measure scalar and AVX frequencies across processor's cores. **Note:** Runtime increases with core count. |
113-
| memory | runs [Intel(r) Memory Latency Checker](https://www.intel.com/content/www/us/en/download/736633/intel-memory-latency-checker-intel-mlc.html) (MLC) to measure memory bandwidth and latency across a load range. **Note: MLC is not included with PerfSpect.** It can be downloaded from [here](https://www.intel.com/content/www/us/en/download/736633/intel-memory-latency-checker-intel-mlc.html). Once downloaded, extract the Linux executable and place it in the perfspect/tools/x86_64 directory. |
129+
| frequency | runs [avx-turbo](https://github.com/travisdowns/avx-turbo) to measure scalar and AVX frequencies across processor's cores. **Note:** Runtime increases with core count. |
130+
| memory | runs [Intel(r) Memory Latency Checker](https://www.intel.com/content/www/us/en/download/736633/intel-memory-latency-checker-intel-mlc.html) (MLC) to measure memory bandwidth and latency across a load range. **Note: MLC is not included with PerfSpect.** It can be downloaded from [Intel Memory Latency Checker](https://www.intel.com/content/www/us/en/download/736633/intel-memory-latency-checker-intel-mlc.html). Once downloaded, extract the Linux executable and place it in the perfspect/tools/x86_64 directory. |
114131
| numa | runs Intel(r) Memory Latency Checker(MLC) to measure bandwidth between NUMA nodes. See Note above about downloading MLC. |
115132
| storage | runs [fio](https://github.com/axboe/fio) for 2 minutes across multiple I/O patterns to measure storage latency, IOPs, and bandwidth. Use --storage-dir to override the default location (/tmp). Minimum 32GB disk space required. |
116133

117134
#### Telemetry Command
135+
118136
The `telemetry` command reports CPU utilization, instruction mix, disk stats, network stats, and more on the specified target(s). All telemetry types are collected by default. To choose telemetry types, see the additional command line options (`perfspect telemetry -h`).
119137

120138
![screenshot of the CPU utilization chart from the HTML output of the telemetry command](docs/telemetry_html.png)
121139

122140
#### Flamegraph Command
141+
123142
Software flamegraphs are useful in diagnosing software performance bottlenecks. Run `perfspect flamegraph` to capture a system-wide software flamegraph.
124143

144+
> [!TIP]
145+
> By default, flamegraphs are collected using the `cycles:P` event. To analyze different performance aspects, use the `--perf-event` flag to specify an alternative perf event (e.g., `cache-misses`, `instructions`, `branches`, `context-switches`, `mem-loads`, `mem-stores`, etc.).
146+
125147
![screenshot of a flamegraph from the HTML output of the flamegraph command](docs/flamegraph.png)
126148

127149
#### Lock Command
150+
128151
As systems contain more and more cores, it can be useful to analyze the Linux kernel lock overhead and potential false-sharing that impacts system scalability. Run `perfspect lock` to collect system-wide hot spot, cache-to-cache and lock contention information. Experienced performance engineers can analyze the collected information to identify bottlenecks.
129152

130153
#### Config Command
131-
The `config` command provides a method to view and change various system configuration parameters. Run `perfspect config -h` to view the parameters that can be modified.
154+
155+
The `config` command provides a method to view and change various system configuration parameters. Run `perfspect config -h` to view the parameters that can be modified.
132156

133157
> [!WARNING]
134158
> Misconfiguring the system may cause it to stop functionining. In some cases, a reboot may be required to restore default settings.
135159
136160
Example:
137-
<pre>
161+
162+
```text
138163
$ ./perfspect config --cores 24 --llc 2.0 --uncore-max 1.8
139164
...
140-
</pre>
165+
```
141166

142167
##### Recording Configuration
168+
143169
The current configuration can, optionally, be saved to a file using the `--record` flag. This creates a human-readable configuration file that can be used to restore settings later.
144170

145171
Example:
146-
<pre>
172+
173+
```text
147174
$ ./perfspect config --tdp 300 --record
148175
Configuration recorded to: perfspect_2025-12-01_14-30-45/gnr_config.txt
149-
</pre>
176+
```
150177

151178
##### Restoring Configuration
179+
152180
The `config restore` subcommand restores configuration from a previously recorded file. This is useful for reverting changes or applying a known-good configuration across multiple systems.
153181

154182
Example:
155-
<pre>
183+
184+
```text
156185
$ ./perfspect config restore perfspect_2025-12-01_14-30-45/gnr_config.txt
157186
Configuration settings to restore from perfspect_2025-12-01_14-30-45/gnr_config.txt:
158187
Cores per Socket : 86
@@ -161,62 +190,75 @@ Configuration settings to restore from perfspect_2025-12-01_14-30-45/gnr_config.
161190
...
162191
Apply these configuration changes? [y/N]: y
163192
...
164-
</pre>
193+
```
165194

166195
Use the `--yes` flag to skip the confirmation prompt:
167-
<pre>
168-
$ ./perfspect config restore perfspect_2025-12-01_14-30-45/gnr_config.txt --yes
169-
</pre>
196+
197+
```text
198+
./perfspect config restore perfspect_2025-12-01_14-30-45/gnr_config.txt --yes
199+
```
170200

171201
> [!TIP]
172202
> The restore command works with remote targets too. Use `--target` or `--targets` to restore configuration on remote systems.
173203
174204
### Common Command Options
175205

176206
#### Local vs. Remote Targets
207+
177208
By default, PerfSpect targets the local host, that is, the host where PerfSpect is running. Remote systems can also be targeted if they are reachable via SSH from the local host.
178209

179210
> [!IMPORTANT]
180211
> Ensure the remote user has password-less sudo access (or root privileges) to fully utilize PerfSpect's capabilities.
181212
182213
To target a single remote system with a pre-configured private key:
183-
<pre>
184-
$ ./perfspect report --target 192.168.1.42 --user fred --key ~/.ssh/fredkey
185-
...
186-
</pre>
214+
215+
```text
216+
./perfspect report --target 192.168.1.42 --user fred --key ~/.ssh/fredkey
217+
```
218+
187219
To target a single remote system with a password:
188-
<pre>
189-
$ ./perfspect report --target 192.168.1.42 --user fred
220+
221+
```text
222+
./perfspect report --target 192.168.1.42 --user fred
190223
[email protected]'s password: ******
191-
...
192-
</pre>
224+
```
225+
193226
To target more than one remote system, a YAML file with the necessary connection parameters is provided to PerfSpect. Refer to the example YAML file: [targets.yaml](targets.yaml).
194-
<pre>
195-
$ ./perfspect report --targets mytargets.yaml
196-
...
197-
</pre>
227+
228+
```text
229+
./perfspect report --targets mytargets.yaml
230+
```
198231

199232
> [!NOTE]
200233
> All PerfSpect commands support remote targets, but some command options are limited to the local target.
201234
202235
#### Output
236+
203237
##### Logging
238+
204239
By default, PerfSpect writes to a log file (perfspect.log) in the user's current working directory. Optionally, PerfSpect can direct logs to the local system's syslog daemon.
205-
<pre>
206-
$ ./perfspect metrics --syslog
207-
</pre>
240+
241+
```text
242+
./perfspect metrics --syslog
243+
```
208244

209245
##### Report Files
246+
210247
By default, PerfSpect creates a unique directory in the user's current working directory to store output files. Users can specify a custom output directory with the --output flag.
211-
<pre>
212-
$./perfspect telemetry --output /home/elaine/perfspect/telemetry
213-
</pre>
248+
249+
```text
250+
./perfspect telemetry --output /home/elaine/perfspect/telemetry
251+
```
214252

215253
## Building PerfSpect from Source
254+
216255
> [!TIP]
217256
> Skip the build. Pre-built PerfSpect releases are available in the repository's [Releases](https://github.com/intel/PerfSpect/releases). Download and extract perfspect.tgz.
257+
218258
### 1st Build
259+
219260
Use `builder/build.sh` to build the dependencies and the application in Docker containers with the required build environments. Ensure Docker is properly configured on your build system before running the script.
220261

221262
### Subsequent Builds
263+
222264
`make` builds the app. It assumes the dependencies have been built previously and that you have Go installed on your development system. See [go.mod](go.mod) for the minimum Go version.

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.13.0-dev
1+
3.13.0

0 commit comments

Comments
 (0)