Skip to content

Commit 4da77eb

Browse files
matteonardelligrussorusso
authored andcommitted
Get estimated node/cloud->DS bandwidth from configuration
1 parent 11aece6 commit 4da77eb

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

internal/config/keys.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,9 @@ const OFFLOADING_POLICY_ILP_OPTIMIZER_PORT = "offloading.policy.ilp.port"
9090

9191
// IP address / hostname used by ILP Offloading Policy for solving the ILP formulation
9292
const OFFLOADING_POLICY_ILP_OPTIMIZER_HOST = "offloading.policy.ilp.host"
93+
94+
// Estimated bandwidth between the current node and the data store
95+
const OFFLOADING_POLICY_NODE_TO_DATA_STORE_BANDWIDTH = "offloading.policy.node2datastore.bandwidth"
96+
97+
// Estimated bandwidth between cloud nodes and the data store
98+
const OFFLOADING_POLICY_CLOUD_TO_DATA_STORE_BANDWIDTH = "offloading.policy.cloud2datastore.bandwidth"

internal/workflow/ilp_offloading_policy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ func (policy *IlpOffloadingPolicy) Evaluate(r *Request, p *Progress) (Offloading
229229
params.DSLatency[CLOUD] = 0.001
230230

231231
// Bandwidth (we assume identical)
232-
dsBandwidth := 100.0 // TODO: read from configuration?
232+
dsBandwidth := config.GetFloat(config.OFFLOADING_POLICY_NODE_TO_DATA_STORE_BANDWIDTH, 100.0)
233233
for _, n := range params.EdgeNodes {
234234
params.DSBandwidth[n] = dsBandwidth
235235
}
236-
params.DSBandwidth[CLOUD] = dsBandwidth * 10
236+
params.DSBandwidth[CLOUD] = config.GetFloat(config.OFFLOADING_POLICY_CLOUD_TO_DATA_STORE_BANDWIDTH, dsBandwidth*10)
237237

238238
// Workflow
239239
params.InputSize = float64(r.ParamsSize)

0 commit comments

Comments
 (0)