Skip to content

Commit 993b783

Browse files
authored
Merge branch 'main' into fix-metrics-collector
2 parents 0882e00 + 9b1a852 commit 993b783

26 files changed

Lines changed: 551 additions & 311 deletions

File tree

.github/workflows/load_testing.yml

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,17 @@ on:
88

99
env:
1010
BUILD_DIR: build
11-
EXECUTABLE_PATH: $BUILD_DIR/nons
12-
13-
GENERATORS_DIR: scripts/generators
14-
FAT_TREE_GENERATOR: $GENERATORS_DIR/topology/fat_tree/fat_tree.py
15-
ALL_TO_ALL_GENERATOR: $GENERATORS_DIR/ti_simulation/all-to-all/all-to-all.py
11+
EXECUTABLE_PATH: build/nons
1612

17-
FAT_TREE_CONFIGS_DIR: .github/workflows/load_testing_configs
18-
FAT_TREE_SMALL_CONFIG: $FAT_TREE_CONFIGS_DIR/small_fat_tree_config.yml
19-
FAT_TREE_MEDIUM_CONFIG: $FAT_TREE_CONFIGS_DIR/medium_fat_tree_config.yml
20-
FAT_TREE_LARGE_CONFIG: $FAT_TREE_CONFIGS_DIR/large_fat_tree_config.yml
21-
22-
FLAMEGRAPH_ARTIFACT_DIR: flamegraph
23-
FLAMEGRAPH_OUTPUT_DIR: $FLAMEGRAPH_ARTIFACT_DIR/flamegraph
13+
GENERATORS_DIR: scripts/generators
14+
FAT_TREE_GENERATOR: scripts/generators/topology/fat_tree/fat_tree.py
15+
FAT_TREE_SMALL_CONFIG: scripts/generators/topology/fat_tree/small_fat_tree_config.yml
16+
FAT_TREE_LARGE_CONFIG: scripts/generators/topology/fat_tree/large_fat_tree_config.yml
17+
ALL_TO_ALL_GENERATOR: scripts/generators/ti_simulation/all-to-all/all-to-all.py
2418

2519
FLAMEGRAPH_TOPOLOGY_NAME: fat_tree_topology.yml
2620
FLAMEGRAPH_SIMULATION_NAME: fat_tree_simulation.yml
21+
FLAMEGRAPH_OUTPUT_DIR: flamegraph/flamegraph
2722

2823
jobs:
2924
load_testing:
@@ -41,13 +36,12 @@ jobs:
4136
- name: Build project
4237
run: cmake --build ${{env.BUILD_DIR}} -j $(nproc)
4338

44-
- name: Update PYTHONPOATH
39+
- name: Update PYTHONPATH
4540
run: echo "PYTHONPATH=${{ github.workspace }}/scripts" >> $GITHUB_ENV
4641

4742
- name: Run simulations
4843
run: |
4944
python3 scripts/generate_configs_and_run.py -e ${{env.EXECUTABLE_PATH}} -t ${{env.FAT_TREE_GENERATOR}} -tc ${{env.FAT_TREE_SMALL_CONFIG}}
50-
python3 scripts/generate_configs_and_run.py -e ${{env.EXECUTABLE_PATH}} -t ${{env.FAT_TREE_GENERATOR}} -tc ${{env.FAT_TREE_MEDIUM_CONFIG}}
5145
python3 scripts/generate_configs_and_run.py -e ${{env.EXECUTABLE_PATH}} -t ${{env.FAT_TREE_GENERATOR}} -tc ${{env.FAT_TREE_LARGE_CONFIG}}
5246
5347
@@ -65,7 +59,7 @@ jobs:
6559
- name: Build project with profiling
6660
run: cmake --build ${{env.BUILD_DIR}} -j $(nproc)
6761

68-
- name: Update PYTHONPOATH
62+
- name: Update PYTHONPATH
6963
run: echo "PYTHONPATH=${{ github.workspace }}/scripts" >> $GITHUB_ENV
7064

7165
- name: Run simulations with profiling
@@ -74,10 +68,6 @@ jobs:
7468
gprof ${{env.EXECUTABLE_PATH}} > profile.txt
7569
head profile.txt
7670
77-
python3 scripts/generate_configs_and_run.py -e ${{env.EXECUTABLE_PATH}} -t ${{env.FAT_TREE_GENERATOR}} -tc ${{env.FAT_TREE_MEDIUM_CONFIG}}
78-
gprof ${{env.EXECUTABLE_PATH}} > profile.txt
79-
head profile.txt
80-
8171
python3 scripts/generate_configs_and_run.py -e ${{env.EXECUTABLE_PATH}} -t ${{env.FAT_TREE_GENERATOR}} -tc ${{env.FAT_TREE_LARGE_CONFIG}}
8272
gprof ${{env.EXECUTABLE_PATH}} > profile.txt
8373
head profile.txt
@@ -102,11 +92,11 @@ jobs:
10292
- name: Build project with profiling
10393
run: cmake --build ${{env.BUILD_DIR}} -j $(nproc)
10494

105-
- name: Update PYTHONPOATH
95+
- name: Update PYTHONPATH
10696
run: echo "PYTHONPATH=${{ github.workspace }}/scripts" >> $GITHUB_ENV
10797

10898
- name: Generate topology config
109-
run: python3 ${{env.FAT_TREE_GENERATOR}} -c ${{env.FAT_TREE_MEDIUM_CONFIG}} -o ${{env.FLAMEGRAPH_TOPOLOGY_NAME}}
99+
run: python3 ${{env.FAT_TREE_GENERATOR}} -c ${{env.FAT_TREE_LARGE_CONFIG}} -o ${{env.FLAMEGRAPH_TOPOLOGY_NAME}}
110100

111101
- name: Generate simulation config
112102
run: python3 ${{env.ALL_TO_ALL_GENERATOR}} -t ${{env.FLAMEGRAPH_TOPOLOGY_NAME}} -o ${{env.FLAMEGRAPH_SIMULATION_NAME}}
@@ -115,7 +105,7 @@ jobs:
115105
run: |
116106
sudo perf record -F 99 -g -- ./${{env.EXECUTABLE_PATH}} -c ${{env.FLAMEGRAPH_SIMULATION_NAME}} --no-logs --no-plots > perf.data
117107
perf report -i perf.data --header-only
118-
perf script -i perf.data -v > out.perf 2>&1 || true
108+
perf script -i perf.data -v > out.perf 2>&1
119109
120110
- name: Prepare FlameGraph
121111
run: |

.github/workflows/load_testing_configs/medium_fat_tree_config.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

configuration_examples/simulation_examples/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ cc:
6767
- `swift`: [swift](https://2022-cs244.github.io/papers/L5-swift.pdf) congestion control (especially see pseudocode on page 516); specific fields:
6868

6969
Required:
70-
+ `target_delay`: value from paper above in [time format](../README.md)
70+
+ `base_target`: value from paper above in [time format](../README.md)
7171

7272
Optional (all are real numbers):
73+
+ `start_cwnd`: initial congestion window size; default: `1`.
7374
+ `ai`: Additive‑increase constant; default: `0.5`.
7475
+ `md`: Multiplicative decrease constant; default: `0.5`.
7576
+ `max_mdf`: Upper bound on MD factor per RTT; default: `0.3`.

configuration_examples/simulation_examples/incast_simulation.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,5 @@ scenario:
6060
- action: send_data
6161
when: 0ns
6262
size: 1000000B
63-
connections: conn.*
63+
connections: conn.*
64+
jitter: 1000ns

scripts/common.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,16 @@ def run_subprocess(subprocess_args : list[str], log_commands : bool = True, chec
3030
Runs subprocess with given args. If command fails, prints its stderr to stderr
3131
Returns result of subprocess.
3232
"""
33-
print(f"Run command: `", *subprocess_args, "`", sep='')
33+
command_str = ' '.join(subprocess_args)
34+
if log_commands:
35+
print(f"Run command: `{command_str}`")
36+
3437
result = subprocess.run(subprocess_args, capture_output=True, text=True)
38+
3539
if result.returncode != 0 and check_fails:
36-
print(f"Command `", *subprocess_args, "` failed; stderr:", sep='', file=sys.stderr)
40+
print(f"Command `{command_str}` failed; stderr:", file=sys.stderr)
3741
print(result.stderr, file=sys.stderr)
42+
3843
return result
3944

4045
def run_nons(

scripts/generators/ti_simulation/all-to-all/default_config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ scenario:
2222
- action: send_data
2323
connections: .*
2424
when: 0ns
25-
size: 1500000B
25+
size: 1500KB
26+
jitter: 1000ns

scripts/generators/topology/fat_tree/default_config.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

scripts/generators/topology/fat_tree/fat_tree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def generate_fat_tree_config(config_params):
8787

8888
if __name__ == "__main__":
8989
args = parse_topology_generator_args(
90-
os.path.join(os.path.dirname(__file__), "default_config.yml"),
90+
os.path.join(os.path.dirname(__file__), "small_fat_tree_config.yml"),
9191
'Generate Fat-Tree network configuration.'\
9292
'You may see more about it here: '\
9393
'https://packetpushers.net/blog/demystifying-dcn-topologies-clos-fat-trees-part2/'

.github/workflows/load_testing_configs/large_fat_tree_config.yml renamed to scripts/generators/topology/fat_tree/large_fat_tree_config.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
switch_ports_count: 16
1+
switch_ports_count: 6
22

33
presets:
44
link:
55
edge-host:
6-
latency: 0ns
6+
latency: 1000ns
77
throughput: 1Gbps
8-
ingress_buffer_size: 4096B
9-
egress_buffer_size: 4096B
8+
ingress_buffer_size: 4096KB
9+
egress_buffer_size: 4096KB
1010
aggr-edge:
11-
latency: 0ns
11+
latency: 1000ns
1212
throughput: 10Gbps
13-
ingress_buffer_size: 4096B
14-
egress_buffer_size: 4096B
13+
ingress_buffer_size: 4096KB
14+
egress_buffer_size: 4096KB
1515
aggr-core:
16-
latency: 0ns
16+
latency: 1000ns
1717
throughput: 100Gbps
18-
ingress_buffer_size: 4096B
19-
egress_buffer_size: 4096B
18+
ingress_buffer_size: 4096KB
19+
egress_buffer_size: 4096KB
2020
switch:
2121
edge:
2222
ecn:

.github/workflows/load_testing_configs/small_fat_tree_config.yml renamed to scripts/generators/topology/fat_tree/small_fat_tree_config.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ switch_ports_count: 4
33
presets:
44
link:
55
edge-host:
6-
latency: 0ns
6+
latency: 1000ns
77
throughput: 1Gbps
8-
ingress_buffer_size: 4096B
9-
egress_buffer_size: 4096B
8+
ingress_buffer_size: 4096KB
9+
egress_buffer_size: 4096KB
1010
aggr-edge:
11-
latency: 0ns
11+
latency: 1000ns
1212
throughput: 10Gbps
13-
ingress_buffer_size: 4096B
14-
egress_buffer_size: 4096B
13+
ingress_buffer_size: 4096KB
14+
egress_buffer_size: 4096KB
1515
aggr-core:
16-
latency: 0ns
16+
latency: 1000ns
1717
throughput: 100Gbps
18-
ingress_buffer_size: 4096B
19-
egress_buffer_size: 4096B
18+
ingress_buffer_size: 4096KB
19+
egress_buffer_size: 4096KB
2020
switch:
2121
edge:
2222
ecn:

0 commit comments

Comments
 (0)