Skip to content

Commit f54212b

Browse files
Merge pull request #2786 from madeline-underwood/aperf
Refine APerf installation guide for clarity and detail
2 parents 8dda8b1 + 32258b5 commit f54212b

1 file changed

Lines changed: 64 additions & 40 deletions

File tree

content/install-guides/aperf.md

Lines changed: 64 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ tool_install: true
1313
weight: 1
1414
---
1515

16-
APerf is an open source command line tool maintained by AWS. It aims to assist users with performance monitoring and debugging on Linux systems. It collects a wide range of performance-related system metrics or data, whose collections traditionally require multiple tools, such as `perf`, `sysstat`, and `sysctl`.
16+
APerf is an open source command line tool maintained by AWS. It helps you monitor and debug performance on Linux systems by collecting a wide range of performance-related system metrics and data that traditionally require multiple tools, such as `perf`, `sysstat`, and `sysctl`.
1717

18-
The collected data are written into an archive, and APerf can generate a static HTML report from one or more archives to visualize the data. When generating the report, APerf also performs analysis on the data to automatically detect potential performance issues. Users can open the report in the browser to view all collected data and analytical findings.
18+
APerf collects system data and saves it in an archive. It then generates a static HTML report from one or more archives to visualize the data. When you generate the report, APerf analyzes the data to automatically detect potential performance issues. You can open the report in a browser to view all collected data and analytical findings.
1919

20-
## What should I do before I begin installing APerf?
20+
## Install APerf
2121

22-
This article provides a quick solution to install APerf on Arm Linux and get started.
22+
This guide provides a quick solution to install APerf on Arm Linux and get started.
23+
24+
## Before you begin
2325

2426
Confirm you are using an Arm machine by running:
2527

@@ -33,27 +35,30 @@ The output should be:
3335
aarch64
3436
```
3537

36-
If you see a different result, you are not using an Arm computer running 64-bit Linux. Note that APerf can only run on Linux.
38+
{{% notice Note %}} If you see a different result, you are not using an Arm computer running 64-bit Linux. APerf can only run on Linux.{{% /notice %}}
39+
40+
To allow APerf to collect PMU (Processor Monitoring Unit) metrics without sudo or root permissions, set `/proc/sys/kernel/perf_event_paranoid` to -1:
3741

38-
To allow APerf to collect PMU (Processor Monitoring Unit) metrics without sudo or root permissions, set `/proc/sys/kernel/perf_event_paranoid` to -1, or run
3942
```bash
4043
sudo sysctl -w kernel.perf_event_paranoid=-1
4144
```
4245

43-
To use APerf's CPU profiling option (`--profile`), install the `perf` binary. Refer to the [Perf for Linux on Arm](/install-guides/perf) install guide for instructions. For kernel address visibility, set `/proc/sys/kernel/kptr_restrict` to 0, or run
46+
To use APerf's CPU profiling option (`--profile`), install the `perf` binary. See the [Perf for Linux on Arm](/install-guides/perf) install guide for instructions.
47+
48+
For kernel address visibility, set `/proc/sys/kernel/kptr_restrict` to 0:
49+
4450
```bash
4551
sudo sysctl -w kernel.kptr_restrict=0
4652
```
4753

4854
To use APerf's Java profiling option (`--profile-java`), install the [async-profiler](https://github.com/async-profiler/async-profiler) tool.
4955

50-
## How do I download and install APerf?
51-
52-
The easiest way to install APerf is to download a release from GitHub, extract it, and setup your `PATH` environment variable or copy the executable to a directory already in your search path.
56+
## Download and install APerf
57+
The easiest way to install APerf is to download a release from GitHub and extract it.
5358

54-
Visit the [releases page](https://github.com/aws/aperf/releases/) to see a list of available releases.
59+
Visit the [releases page](https://github.com/aws/aperf/releases/) to see available releases.
5560

56-
You can also download a release from the command line:
61+
You can download a release from the command line:
5762

5863
```bash { target="ubuntu:latest" }
5964
wget https://github.com/aws/aperf/releases/download/v1.0.0/aperf-v1.0.0-aarch64.tar.gz
@@ -90,78 +95,97 @@ The output should print the version:
9095
aperf 1.0.0 (4cf8d28)
9196
```
9297

93-
## How do I verify APerf is working?
98+
## Verify APerf is working
9499

95-
### How do I create and view a report?
100+
To confirm APerf is working, start a collection run with the default settings. The default interval is 1 second, and the default period is 10 seconds.
96101

97-
To confirm APerf is working, start a new collection run that collects data every 1 second for 10 seconds, which are the default interval and period. Add the `--profile` or `--profile-java` flags if needed.
102+
Run the following command to start data collection:
98103

99104
```console
100105
aperf record -r test_1
101106
```
102107

103-
After 10 seconds the collection completes, and APerf produces a directory named `test_1` and a tar file named `test_1.tar.gz`.
108+
After 10 seconds, the collection completes. APerf creates a directory named `test_1` and a tar file named `test_1.tar.gz`.
104109

105-
Next, generate a report from the recorded data:
110+
If you need CPU profiling, add the `--profile` flag. For Java profiling, add the `--profile-java` flag.
111+
112+
### How do I create and view a report?
113+
114+
Generate a report from the recorded data:
106115

107116
```console
108117
aperf report -r test_1 -n test_report
109118
```
110119

111-
The name of the report is `test_report`, and you will see directory named `test_report` and a tar file named `test_report.tar.gz`.
120+
APerf creates a directory named `test_report` and a tar file named `test_report.tar.gz`. The tar file is useful when you want to copy the report to another machine.
112121

113-
The tar files are useful if you want to copy them to another machine.
122+
To view the report, open the `index.html` file in the `test_report/` directory using a web browser. Press `Ctrl+O` on Linux and Windows, or `⌘+O` on macOS.
114123

115-
Using a web browser, open the file `index.html` in the `test_report/` directory. To open the file use `Ctrl+O` for Linux and Windows and use `⌘+O` for macOS.
124+
The report's home page displays system information from the APerf run, followed by analytical findings that highlight potential performance issues:
116125

117-
In the report's home page, you can see the system information of the APerf run, followed by all analytical findings that list out potential performance issues:
126+
![APerf report home page showing system information and analytical findings alt-txt#center](/install-guides/_images/aperf_report_home.png "APerf report home page")
118127

119-
![APerf report home #center](/install-guides/_images/aperf_report_home.png)
128+
You can browse through all collected data using the navigation panel on the left.
120129

121-
You can browse through all data using the navigation panel at the left.
130+
To learn more about a specific metric, select the info button next to it to open the help panel:
122131

123-
If you want to learn more about a metric, click the "info" button by it and open the help panel:
132+
![APerf report help panel showing detailed metric information alt-txt#center](/install-guides/_images/aperf_report_help_panel.png "APerf report help panel")
124133

125-
![APerf report help panel #center](/install-guides/_images/aperf_report_help_panel.png)
134+
### How do I compare multiple runs?
126135

127-
### How do I create and view a report containing 2 runs?
128-
129-
To demonstrate comparing 2 runs, create a second run with `aperf record`:
136+
To demonstrate comparing multiple runs, create a second run with `aperf record`:
130137

131138
```console
132139
aperf record -r test_2
133140
```
134141

135142
Similarly, after 10 seconds the collection completes, and APerf produces a directory named `test_2` and a tar file named `test_2.tar.gz`.
136143

137-
Generate a report with both the first and second runs included (note that the first run in the `-r` arguments will be used as the base run for any automatic comparisons):
144+
Generate a report that includes both runs. The first run in the `-r` arguments becomes the base run for automatic comparisons:
138145

139146
```console
140147
aperf report -r test_1 test_2 -n compare_report
141148
```
142149

143-
The name of the report is `compare_report`, and APerf produces a directory named `compare_report` and a tar file named `compare_report.tar.gz`.
150+
APerf creates a directory named `compare_report` and a tar file named `compare_report.tar.gz`.
151+
152+
Open the `index.html` file in the `compare_report/` directory using a web browser.
144153

145-
Open the `index.html` file in the `compare_report/` directory. Since multiple runs are included in the report, APerf compares the data in all runs against the base run, and generates the statistical findings in the home page:
154+
Because the report includes multiple runs, APerf compares all runs against the base run and displays statistical findings on the home page:
146155

147-
![APerf report statistical findings #center](/install-guides/_images/aperf_report_statistical_findings.png)
156+
![APerf report home page showing statistical comparisons between multiple runs alt-text#center](/install-guides/_images/aperf_report_statistical_findings.png "APerf report statistical findings")
148157

149-
When viewing the metric graphs, graphs of the same metric in two runs are aligned together:
158+
When you view metric graphs, APerf aligns graphs of the same metric from different runs side by side for easy comparison:
150159

151-
![APerf report aligned graphs #center](/install-guides/_images/aperf_report_aligned_graphs.png)
160+
![APerf report showing aligned metric graphs from multiple runs for comparison alt-text#center](/install-guides/_images/aperf_report_aligned_graphs.png "APerf report aligned graphs")
152161

153-
### How do I use an HTTP server to view reports?
162+
### How do I view reports from a remote system?
154163

155-
If you are doing performance analysis on a remote system or cloud instance without a remote desktop, you can view the APerf reports from your local browser by running a simple web server on the remote machine.
164+
If you're working on a remote system or cloud instance without a desktop environment, you can view APerf reports in your local browser by running a web server on the remote machine.
156165

157-
In the directory with the report data and the `index.html` file run a simple web server:
166+
Navigate to the directory containing the report and the `index.html` file:
167+
168+
```console
169+
cd test_report
170+
```
171+
172+
Start a simple HTTP server:
158173

159174
```console
160175
python -m http.server 3000
161176
```
162177

163-
Make sure port 3000 is open on the remote system and enter the IP address of the remote system followed by `:3000` in your browser address bar.
178+
The server starts on port 3000. Make sure this port is open in your firewall or security group settings.
179+
180+
Open a web browser on your local machine and navigate to:
181+
182+
```output
183+
http://<remote-ip-address>:3000
184+
```
185+
186+
Replace `<remote-ip-address>` with the IP address of your remote system.
187+
188+
The APerf report opens in your browser without needing to copy files to your local machine.
164189

165-
You will see the same APerf report, and avoid the need to copy files to your local machine from the remote system for viewing.
190+
You're now ready to use APerf for performance analysis on your Arm Linux system.
166191

167-
You are ready to use APerf for performance analysis on your Arm Linux system.

0 commit comments

Comments
 (0)