Skip to content

Commit e50ee9e

Browse files
Get estimated node/cloud->DS bandwidth from configuration
1 parent 234b5a8 commit e50ee9e

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
@@ -227,11 +227,11 @@ func (policy *IlpOffloadingPolicy) Evaluate(r *Request, p *Progress) (Offloading
227227
params.DSLatency[CLOUD] = 0.001
228228

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

236236
// Workflow
237237
params.InputSize = float64(r.ParamsSize)

0 commit comments

Comments
 (0)