You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/install-guides/aperf.md
+64-40Lines changed: 64 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,13 +13,15 @@ tool_install: true
13
13
weight: 1
14
14
---
15
15
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`.
17
17
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.
19
19
20
-
## What should I do before I begin installing APerf?
20
+
## Install APerf
21
21
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
23
25
24
26
Confirm you are using an Arm machine by running:
25
27
@@ -33,27 +35,30 @@ The output should be:
33
35
aarch64
34
36
```
35
37
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:
37
41
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
39
42
```bash
40
43
sudo sysctl -w kernel.perf_event_paranoid=-1
41
44
```
42
45
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
+
44
50
```bash
45
51
sudo sysctl -w kernel.kptr_restrict=0
46
52
```
47
53
48
54
To use APerf's Java profiling option (`--profile-java`), install the [async-profiler](https://github.com/async-profiler/async-profiler) tool.
49
55
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.
53
58
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.
55
60
56
-
You can also download a release from the command line:
@@ -90,78 +95,97 @@ The output should print the version:
90
95
aperf 1.0.0 (4cf8d28)
91
96
```
92
97
93
-
## How do I verify APerf is working?
98
+
## Verify APerf is working
94
99
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.
96
101
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:
98
103
99
104
```console
100
105
aperf record -r test_1
101
106
```
102
107
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`.
104
109
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:
106
115
107
116
```console
108
117
aperf report -r test_1 -n test_report
109
118
```
110
119
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.
112
121
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.
114
123
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:
116
125
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
+

118
127
119
-

128
+
You can browse through all collected data using the navigation panel on the left.
120
129
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:
122
131
123
-
If you want to learn more about a metric, click the "info" button by it and open the help panel:
132
+

124
133
125
-

134
+
### How do I compare multiple runs?
126
135
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`:
130
137
131
138
```console
132
139
aperf record -r test_2
133
140
```
134
141
135
142
Similarly, after 10 seconds the collection completes, and APerf produces a directory named `test_2` and a tar file named `test_2.tar.gz`.
136
143
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:
138
145
139
146
```console
140
147
aperf report -r test_1 test_2 -n compare_report
141
148
```
142
149
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.
144
153
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:

152
161
153
-
### How do I use an HTTP server to view reports?
162
+
### How do I view reports from a remote system?
154
163
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.
156
165
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:
158
173
159
174
```console
160
175
python -m http.server 3000
161
176
```
162
177
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.
164
189
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.
166
191
167
-
You are ready to use APerf for performance analysis on your Arm Linux system.
0 commit comments