"...git@developer.sourcefind.cn:OpenDAS/torchani.git" did not exist on "54ab56ee289dcd59a4ac6fa5a7b3202d6b642863"
Commit a7aa2b33 authored by Antoine Kaufmann's avatar Antoine Kaufmann Committed by Hejing Li
Browse files

experiments: add weights to switches in e2e dc topology

Choose number of hosts underneath switch as weight
parent bb9781a0
...@@ -145,6 +145,8 @@ class DCFatTree(E2ETopology): ...@@ -145,6 +145,8 @@ class DCFatTree(E2ETopology):
# Create spine switches # Create spine switches
for i in range(0, self.params['n_spine_sw']): for i in range(0, self.params['n_spine_sw']):
sw = e2e.E2ESwitchNode(f"_{bn}spine{i}") sw = e2e.E2ESwitchNode(f"_{bn}spine{i}")
sw.weight = (self.params['n_agg_bl'] * self.params['n_agg_sw'] *
self.params['n_agg_racks'] * self.params['h_per_rack'])
sw.mtu = self.params['mtu'] sw.mtu = self.params['mtu']
self.spine_switches.append(sw) self.spine_switches.append(sw)
self.switches.append(sw) self.switches.append(sw)
...@@ -160,6 +162,8 @@ class DCFatTree(E2ETopology): ...@@ -160,6 +162,8 @@ class DCFatTree(E2ETopology):
# Create switches in aggregation blocks # Create switches in aggregation blocks
for j in range(0, self.params['n_agg_sw']): for j in range(0, self.params['n_agg_sw']):
sw = e2e.E2ESwitchNode(f"_{bn}agg{i}_{j}") sw = e2e.E2ESwitchNode(f"_{bn}agg{i}_{j}")
sw.weight = (self.params['n_agg_racks'] *
self.params['h_per_rack'])
sw.mtu = self.params['mtu'] sw.mtu = self.params['mtu']
ab['switches'].append(sw) ab['switches'].append(sw)
self.switches.append(sw) self.switches.append(sw)
...@@ -167,6 +171,7 @@ class DCFatTree(E2ETopology): ...@@ -167,6 +171,7 @@ class DCFatTree(E2ETopology):
# Create racks (including ToRs) # Create racks (including ToRs)
for j in range(0, self.params['n_agg_racks']): for j in range(0, self.params['n_agg_racks']):
tor = e2e.E2ESwitchNode(f"_{bn}tor{i}_{j}") tor = e2e.E2ESwitchNode(f"_{bn}tor{i}_{j}")
tor.weight = self.params['h_per_rack']
sw.mtu = self.params['mtu'] sw.mtu = self.params['mtu']
r = { r = {
'id': f'rack{i}_{j}', 'id': f'rack{i}_{j}',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment