Skip to content

Commit b3a1b42

Browse files
authored
Improve readmes
1 parent d91afc8 commit b3a1b42

File tree

3 files changed

+61
-69
lines changed

3 files changed

+61
-69
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,23 @@ Heimdall is a benchmark suite to profile the heterogeneous memory systems, inclu
66

77
## Usage
88

9+
To install and use Heimdall, please follow these instructions. Currently, Heimdall is supported only on Ubuntu. Specifically, **2X.XX**. While it is possible to run the benchmarks on other platforms, that would require manually installing the dependencies.
10+
911
### Install dependencies
1012
1. Clone the repo:
1113
```
1214
git clone 'https://github.com/awesome-cxl/heimdall.git' --recursive
1315
```
1416
2. Install `uv` and `pre-commit`, e.g.:
15-
**pip**
17+
<!-- **pip** -->
1618
```
1719
pip install uv pre-commit
1820
```
1921
20-
**MacOS**
22+
<!-- **MacOS**
2123
```
2224
brew install uv pre-commit
23-
```
25+
``` -->
2426
3. Activate the uv python environment and execute the heimdall command line.
2527
```shell
2628
uv run heimdall --help
Lines changed: 42 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,96 @@
11
# Basic Performance
22

3-
## 1. Clone the code
3+
## 1. Configure the machine environment files
44

5-
```shell
6-
git clone --recurse-submodules git@github.com:awesome-cxl/heimdall.git
7-
```
8-
9-
## 2. Make Environment files
10-
11-
You need to define two env files:
12-
13-
a. Make the user env file, ***`USER_PASSWORD` field is mandatory*** while other ones are optional
14-
15-
```shell
16-
cd benchmark/basic_performance/env_files
17-
nano self_template.env
18-
mv self_template.env self.env
19-
```
5+
Heimdall needs two configuration files to understand the test environment:
206

21-
b. Make the machine's env file ***ALL fields are required in this file***
7+
1. Create the user configuration file, ***`USER_PASSWORD` field is mandatory*** while others are optional
8+
```shell
9+
cd benchmark/basic_performance/env_files
10+
nano self_template.env
11+
mv self_template.env self.env
12+
```
2213

23-
```shell
24-
cd benchmark/basic_performance/env_files
25-
nano machine_template.env
26-
mv machine_template.env {hostname}.env
27-
```
14+
2. Create the machine configuration file ***All fields are required in this file***
15+
```shell
16+
cd benchmark/basic_performance/env_files
17+
nano machine_template.env
18+
mv machine_template.env $(hostname).env
19+
```
2820

29-
if you don't know the hostname, you can use the following command to get it:
21+
## 2. [Recommended] Modify/create the test sciript
3022

23+
Next, we will create tests script to configure the BW vs Latency and Cache Latency tests.
3124

32-
```shell
33-
hostname
34-
```
35-
## 3. [Recommended] Modify/make the test sciript
25+
### Bandwidth vs Latency Test
3626

37-
For bandwidth vs latency test
27+
Configure the bandwidth vs latency test script:
3828

3929
```bash
4030
cd benchmark/basic_performance/scripts/batch
41-
nano 100_{your test script}.yaml or reuse previous one 100_bw_vs_latency.yaml, etc..
31+
nano 100_{your test script}.yaml # or reuse previous one 100_bw_vs_latency.yaml, etc..
4232
```
43-
1. Thread number & Thread number type configuration:
44-
- 'thread_num_type':
33+
34+
**Fields**
35+
36+
1. Thread number & Thread number type configuration:
37+
- `thread_num_type`:
4538
- `0`: user defined thread number, specify the thread number in `thread_num_array`
4639
- `1`: auto detect thread number, in this mode, thread number will be detected automatically and sweep the thread number from 1 to the detected thread number
47-
- 'thread_num_array':
40+
- `thread_num_array`:
4841
- Specify how many thread to use in the test
4942
- **Warning**: Don't overflow the number of cores in the machine
50-
- Example: In this case, we change the thread number from 1 to 3 and conduct the test
43+
- **Example**: In this case, we sweep the thread count between 1 and 3 and run the test
5144
```yaml
5245
thread_num_array: [1, 2, 3]
5346
```
5447
2. `pattern_iteration_array` configuration:
5548
- specify how many time iteration to run the random pointer chasing
5649
3. `thread_buffer_size` array_megabyte configuration:
5750
- specify the buffer size for each thread
58-
4. numa_node_array configuration:
59-
1. specify the numa node to use
60-
5. core_socket_array configuration:
61-
1. specify the core to use
51+
4. `numa_node_array` configuration:
52+
- specify the numa node to use
53+
5. `core_socket_array` configuration:
54+
- specify the core to use
6255
6. `loadstore_array` configuration:
6356
- `0`: load
6457
- `1`: store
6558

66-
For cache analysis test
59+
### Cache Analysis Test
6760

6861
```bash
6962
cd benchmark/basic_performance/scripts/batch
70-
nano 200_{your test script}.yaml or reuse previous one 200_cache_heatmap.yaml
63+
nano 200_{your test script}.yaml # or reuse 200_cache_heatmap.yaml
7164
```
7265

73-
## 4. Start the test
66+
## 3. Start the test
7467

75-
For bandwidth vs latency test
68+
For the bandwidth vs latency test
7669

7770
```bash
78-
cd {top directory}
71+
cd ${HEIMDALL_ROOT}
7972
uv run heimdall bench build basic bw
8073
uv run heimdall bench run basic bw
8174
```
8275

83-
For cache analysis test
76+
For the cache analysis test
8477

8578
```bash
86-
cd {top directory}
79+
cd ${HEIMDALL_ROOT}
8780
uv run heimdall bench build basic cache
8881
uv run heimdall bench run basic cache
8982
```
9083

91-
## 5. Check the result
84+
## 4. Check the result
9285

93-
For bandwidth vs latency test
86+
For the bandwidth vs latency test
9487

9588
```bash
96-
cd {top directory}/results/basic_performance/100
89+
cd ${HEIMDALL_ROOT}/results/basic_performance/100
9790
```
9891

99-
For cache analysis test
92+
For the cache analysis test
10093

10194
```bash
102-
cd {top directory}/results/basic_performance/200
95+
cd ${HEIMDALL_ROOT}/results/basic_performance/200
10396
```

benchmark/lockfree_bench/README.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,20 @@
22

33
## Usage
44

5-
Install dependencies:
6-
7-
```shell
8-
USER_PASSWORD=password uv run heimdall bench install lockfree all
9-
```
10-
11-
Build benchmark
12-
13-
```shell
14-
USER_PASSWORD=password uv run heimdall bench build lockfree all
15-
```
16-
17-
Run benchmark
18-
19-
```shell
20-
USER_PASSWORD=password uv run heimdall bench run lockfree <machine_name>
21-
```
5+
1. Install dependencies:
6+
```shell
7+
USER_PASSWORD=password uv run heimdall bench install lockfree all
8+
```
9+
10+
2. Build benchmark
11+
```shell
12+
USER_PASSWORD=password uv run heimdall bench build lockfree all
13+
```
14+
15+
3. Run benchmark
16+
```shell
17+
USER_PASSWORD=password uv run heimdall bench run lockfree <machine_name>
18+
```
2219

2320
Before running the benchmark, please add configuration of the machine in `run_bench.py`. The configuration is stored in map `numa_configs`. The key is the `machine_name` in running command. Values' meaning is in the comment of the map.
2421

0 commit comments

Comments
 (0)