Skip to content

Commit 9c04723

Browse files
Merge pull request #2061 from jasonrandrews/review
Review DCPerf install guide
2 parents 0f95401 + 28308f7 commit 9c04723

File tree

1 file changed

+74
-23
lines changed

1 file changed

+74
-23
lines changed

content/install-guides/dcperf.md

Lines changed: 74 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ author: Kieran Hejmadi
44
minutes_to_complete: 20
55
official_docs: https://github.com/facebookresearch/DCPerf?tab=readme-ov-file#install-and-run-benchmarks
66

7+
draft: true
8+
79
additional_search_terms:
810
- linux
911
- Neoverse
@@ -21,33 +23,55 @@ weight: 1
2123

2224
## Introduction
2325

24-
DCPerf is an open source benchmarking and microbenchmarking suite, originally developed by Meta, that faithfully replicates the characteristics of various general purpose data center workloads. One of the key differentiators to alternate benchmarking software is the fidelity of micro-architectural behaviour replicated by DCPerf, for example, cache misses, branch misprediction rate etc.
26+
DCPerf is an open source benchmarking and microbenchmarking suite, originally developed by Meta, that faithfully replicates the characteristics of various general purpose data center workloads. One of the key differentiators compared to alternative benchmarking software is the fidelity of micro-architectural behavior replicated by DCPerf, for example, cache misses and branch misprediction rate.
27+
28+
DCPerf generates performance data to inform procurement decisions. It can also be used for regression testing to detect changes in the environment, such as kernel and compiler changes.
2529

26-
The use cases of running DCPerf are to generate performance data to inform procurement decision and regression testing for changes in environment, such as kernel and compiler changes. This installation guide is to install DCPerf on Arm-based servers. This example has been tested on a AWS `c7g.metal` instance running Ubuntu 22.04 LTS.
30+
You can install DCPerf on Arm-based servers. The examples below have been tested on an AWS `c7g.metal` instance running Ubuntu 22.04 LTS.
2731

28-
Please Note: When running on a server provided by a cloud service provided, you will have limit access to change parameters such as BIOS settings which can impact performance.
32+
{{% notice Note %}}
33+
When running on a server provided by a cloud service, you will have limited access to some parameters, such as UEFI settings, which can impact performance.
34+
{{% /notice %}}
2935

3036
## Install Prerequisites
3137

32-
Enter the default daemons to restart if asked.
38+
To get started, install the required software:
3339

3440
```bash
3541
sudo apt update
36-
sudo apt install -y python3-pip git
37-
sudo pip3 install click pyyaml tabulate pandas
42+
sudo apt install -y python-is-python3 python3-pip python3-venv git
43+
```
44+
45+
It is recommended that you install Python packages in a Python virtual environment.
46+
47+
Set up your virtual environment:
48+
49+
```bash
50+
python -m venv venv
51+
source venv/bin/activate
52+
```
53+
If requested, restart the recommended services.
54+
55+
Install the required packages:
56+
57+
```bash
58+
pip3 install click pyyaml tabulate pandas
3859
```
3960

40-
Clone the repostory
61+
Clone the repository:
4162

4263
```bash
4364
git clone https://github.com/facebookresearch/DCPerf.git
4465
cd DCPerf
4566
```
4667

68+
## Running the MediaWiki Benchmark
69+
70+
DCPerf offers many benchmarks. Please refer to the official documentation for the benchmark of your choice.
4771

48-
## Running a the MediaWiki Benchmark
72+
One example is the MediaWiki benchmark, designed to faithfully reproduce the workload of the Facebook social networking site.
4973

50-
DCPerf offers many benchmarks, please refer the official documentation for the benchmark of your choice. In this example we will run the MediaWiki benchmark. The MediaWiki benchmark is designed to faithfully reproduce the workload of the facebook social networking site. First install the dependency.
74+
Install HipHop Virtual Machine (HHVM), a virtual machine used to execute the web application code.
5175

5276
```bash
5377
wget https://github.com/facebookresearch/DCPerf/releases/download/hhvm/hhvm-3.30-multplatform-binary-ubuntu.tar.xz
@@ -57,59 +81,57 @@ sudo ./pour-hhvm.sh
5781
export LD_LIBRARY_PATH="/opt/local/hhvm-3.30/lib:$LD_LIBRARY_PATH"
5882
```
5983

60-
Confirm `hhvm` is available with no link time issues. `hhvm` will be available in the `DCPerf/hhvm/aarch64-ubuntu22.04/hhvm-3.30/bin` directory.
84+
Confirm `hhvm` is available. The `hhvm` binary is located in the `DCPerf/hhvm/aarch64-ubuntu22.04/hhvm-3.30/bin` directory.
6185

6286
```bash
6387
hhvm --version
6488
```
6589

66-
You should see an output like the following with no errors.
90+
You should see output similar to:
6791

6892
```output
6993
HipHop VM 3.30.12 (rel)
7094
Compiler: 1704922878_080332982
7195
Repo schema: 4239d11395efb06bee3ab2923797fedfee64738e
7296
```
7397

74-
Confirm security-enhanced Linux (SELinux) is disabled with the following commands.
98+
Confirm security-enhanced Linux (SELinux) is disabled with the following commands:
7599

76100
```bash
77101
sudo apt install selinux-utils
78102
getenforce
79103
```
80104

81-
You should see the following response. If you do not see the `Disabled` output. Please refer to your distributions documentation on how to disable before proceeding.
105+
You should see the following response. If you do not see the `Disabled` output, please refer to your Linux distribution documentation for information about how to disable SELinux.
82106

83107
```output
84108
Disabled
85109
```
86110

111+
The `install` argument to the `benchpress_cli.py` command line script can be used to automatically install all dependencies for each benchmark.
87112

88-
The `install` argument to the `benchpress_cli.py` command line script can be used to automatially install all dependencies for each benchmark.
89-
90-
```bash
113+
```console
91114
sudo ./benchpress_cli.py install oss_performance_mediawiki_mlp
92115
```
93116

94-
Please note this can take several minutes to do all the required steps.
95-
117+
Please note this may take several minutes to complete.
96118

97119
## Run the MediaWiki Benchmark
98120

99-
For sake of brevity we will pass in duration and timeout arguments through a `JSON` dictionary with the `-i` argument.
121+
For the sake of brevity, you can provide the duration and timeout arguments using a `JSON` dictionary with the `-i` argument.
100122

101-
```bash
123+
```console
102124
sudo ./benchpress_cli.py run oss_performance_mediawiki_mlp -i '{
103125
"duration": "30s",
104126
"timeout": "1m"
105127
}'
106128
```
107129

108-
Whilst the benchmark is running you will be able to observe the various processes occupying the CPU with the `top` command.
130+
While the benchmark is running, you can observe the various processes occupying the CPU with the `top` command.
109131

132+
Once the benchmark is complete, a `benchmark_metrics_*` directory will be created within the `DCPerf` directory, containing a `JSON` file for the system specs and another for the metrics.
110133

111-
Once the benchmark is complete, within the `DCPerf` directory a `benchmark_metrics_*` directory will be created with a `JSON` file for the system specs and metrics respectively.
112-
For example, the metrics file will list the
134+
For example, the metrics file will list the following:
113135

114136
```output
115137
"metrics": {
@@ -133,3 +155,32 @@ For example, the metrics file will list the
133155
},
134156
"score": 2.4692578125
135157
```
158+
159+
## Understanding the Benchmark Results
160+
161+
The metrics file contains several key performance indicators from the benchmark run:
162+
163+
164+
- **Nginx 200, 404, 499**: The number of HTTP responses with status codes 200 (success), 404 (not found), and 499 (client closed request) returned by the Nginx web server during the test.
165+
- **Nginx P50/P90/P95/P99 time**: The response time percentiles (in seconds) for requests handled by Nginx. For example, P50 is the median response time, P99 is the time under which 99% of requests completed.
166+
- **Nginx avg bytes**: The average number of bytes sent per response.
167+
- **Nginx avg time**: The average response time for all requests.
168+
- **Nginx hits**: The total number of requests handled by Nginx.
169+
- **Wrk RPS**: The average number of requests per second (RPS) generated by the `wrk` load testing tool.
170+
- **Wrk failed requests**: The number of requests that failed during the test.
171+
- **Wrk requests**: The total number of requests sent by `wrk`.
172+
- **Wrk successful requests**: The number of requests that completed successfully.
173+
- **Wrk wall sec**: The total wall-clock time (in seconds) for the benchmark run.
174+
- **score**: An overall performance score calculated by DCPerf, which can be used to compare different systems or configurations.
175+
176+
{{% notice Note %}}
177+
`wrk` is a modern HTTP benchmarking tool used to generate load and measure web server performance. It is widely used for benchmarking because it can produce significant load and provides detailed statistics. For more information, see [wrk's GitHub page](https://github.com/wg/wrk).
178+
{{% /notice %}}
179+
180+
These metrics help you evaluate the performance and reliability of the system under test. Higher values for successful requests and RPS, and lower response times, generally indicate better performance. The score provides a single value for easy comparison across runs or systems.
181+
182+
## Next Steps
183+
184+
- Use the results to compare performance across different systems, hardware configurations, or after making system changes (e.g., kernel or compiler updates).
185+
- Consider tuning system parameters or trying different DCPerf benchmarks to further evaluate your environment.
186+
- Explore the other DCPerf benchmarks

0 commit comments

Comments
 (0)