|
1 | 1 | # Basic Performance |
2 | 2 |
|
3 | | -## 1. Clone the code |
| 3 | +## 1. Configure the machine environment files |
4 | 4 |
|
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: |
20 | 6 |
|
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 | + ``` |
22 | 13 |
|
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 | + ``` |
28 | 20 |
|
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 |
30 | 22 |
|
| 23 | +Next, we will create tests script to configure the BW vs Latency and Cache Latency tests. |
31 | 24 |
|
32 | | -```shell |
33 | | -hostname |
34 | | -``` |
35 | | -## 3. [Recommended] Modify/make the test sciript |
| 25 | +### Bandwidth vs Latency Test |
36 | 26 |
|
37 | | -For bandwidth vs latency test |
| 27 | +Configure the bandwidth vs latency test script: |
38 | 28 |
|
39 | 29 | ```bash |
40 | 30 | 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.. |
42 | 32 | ``` |
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`: |
45 | 38 | - `0`: user defined thread number, specify the thread number in `thread_num_array` |
46 | 39 | - `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`: |
48 | 41 | - Specify how many thread to use in the test |
49 | 42 | - **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 |
51 | 44 | ```yaml |
52 | 45 | thread_num_array: [1, 2, 3] |
53 | 46 | ``` |
54 | 47 | 2. `pattern_iteration_array` configuration: |
55 | 48 | - specify how many time iteration to run the random pointer chasing |
56 | 49 | 3. `thread_buffer_size` array_megabyte configuration: |
57 | 50 | - 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 |
62 | 55 | 6. `loadstore_array` configuration: |
63 | 56 | - `0`: load |
64 | 57 | - `1`: store |
65 | 58 |
|
66 | | -For cache analysis test |
| 59 | +### Cache Analysis Test |
67 | 60 |
|
68 | 61 | ```bash |
69 | 62 | 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 |
71 | 64 | ``` |
72 | 65 |
|
73 | | -## 4. Start the test |
| 66 | +## 3. Start the test |
74 | 67 |
|
75 | | -For bandwidth vs latency test |
| 68 | +For the bandwidth vs latency test |
76 | 69 |
|
77 | 70 | ```bash |
78 | | -cd {top directory} |
| 71 | +cd ${HEIMDALL_ROOT} |
79 | 72 | uv run heimdall bench build basic bw |
80 | 73 | uv run heimdall bench run basic bw |
81 | 74 | ``` |
82 | 75 |
|
83 | | -For cache analysis test |
| 76 | +For the cache analysis test |
84 | 77 |
|
85 | 78 | ```bash |
86 | | -cd {top directory} |
| 79 | +cd ${HEIMDALL_ROOT} |
87 | 80 | uv run heimdall bench build basic cache |
88 | 81 | uv run heimdall bench run basic cache |
89 | 82 | ``` |
90 | 83 |
|
91 | | -## 5. Check the result |
| 84 | +## 4. Check the result |
92 | 85 |
|
93 | | -For bandwidth vs latency test |
| 86 | +For the bandwidth vs latency test |
94 | 87 |
|
95 | 88 | ```bash |
96 | | -cd {top directory}/results/basic_performance/100 |
| 89 | +cd ${HEIMDALL_ROOT}/results/basic_performance/100 |
97 | 90 | ``` |
98 | 91 |
|
99 | | -For cache analysis test |
| 92 | +For the cache analysis test |
100 | 93 |
|
101 | 94 | ```bash |
102 | | -cd {top directory}/results/basic_performance/200 |
| 95 | +cd ${HEIMDALL_ROOT}/results/basic_performance/200 |
103 | 96 | ``` |
0 commit comments