Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 28 additions & 25 deletions scripts/batch_run.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
run_time: 4
run_time: 3

params:
request_freq:
- low:
- middle:
- high:
# - middle:
# - high:
dag_type:
# - single:
# - mix:
Expand All @@ -16,40 +16,43 @@ params:
mech_scale_sche:
scale_sche_joint:
scale_num:
# - hpa:
- hpa:
# - temp_scaler:
- ensure_scaler:
# - ensure_scaler:
scale_down_exec:
- default:
scale_up_exec:
- least_task:
sche:
# - bp_balance:
# - pos: greedy
- ensure_scheduler:
# - ensure_scheduler:
- priority: a
- heft:
- priority: b
filter:
# - []
- [{'careful_down':''}]

scale_sche_separated:
scale_num:
- temp_scaler:
- hpa:
- lass:
scale_down_exec:
- default:
scale_up_exec:
- least_task:
sche:
# - greedy:
# - hash:
# - random:
- load_least:
# - rotate:
- pass:
filter:
# - []
- [{'careful_down':''}]
# scale_sche_separated:
# scale_num:
# - temp_scaler:
# - hpa:
# - lass:
# scale_down_exec:
# - default:
# scale_up_exec:
# - least_task:
# sche:
# # - greedy:
# # - hash:
# # - random:
# - load_least:
# # - rotate:
# - pass:
# filter:
# # - []
# - [{'careful_down':''}]

# no_scale:
# scale_num:
Expand Down
19 changes: 3 additions & 16 deletions scripts/fast_draw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,9 @@ filter:

## each group bars
targets_alias:
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'single', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'ensure_scaler.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'ensure_scheduler.', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtsingle.cshigh.ftcpu.nml1.mtscale_sche_joint.scl(ensure_scaler.)(default.)(least_task.)[(careful_down.)].scd(ensure_scheduler.).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'single', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'hpa.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'bp_balance.', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtsingle.cshigh.ftcpu.nml1.mtscale_sche_joint.scl(hpa.)(default.)(least_task.)[(careful_down.)].scd(bp_balance.).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'single', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'hpa.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'pos.greedy', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtsingle.cshigh.ftcpu.nml1.mtscale_sche_joint.scl(hpa.)(default.)(least_task.)[(careful_down.)].scd(pos.greedy).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'single', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'temp_scaler.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'bp_balance.', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtsingle.cshigh.ftcpu.nml1.mtscale_sche_joint.scl(temp_scaler.)(default.)(least_task.)[(careful_down.)].scd(bp_balance.).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'single', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'temp_scaler.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'pos.greedy', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtsingle.cshigh.ftcpu.nml1.mtscale_sche_joint.scl(temp_scaler.)(default.)(least_task.)[(careful_down.)].scd(pos.greedy).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'single', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'hpa.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'greedy.', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtsingle.cshigh.ftcpu.nml1.mtscale_sche_separated.scl(hpa.)(default.)(least_task.)[(careful_down.)].scd(greedy.).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'single', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'hpa.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'hash.', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtsingle.cshigh.ftcpu.nml1.mtscale_sche_separated.scl(hpa.)(default.)(least_task.)[(careful_down.)].scd(hash.).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'single', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'hpa.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'load_least.', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtsingle.cshigh.ftcpu.nml1.mtscale_sche_separated.scl(hpa.)(default.)(least_task.)[(careful_down.)].scd(load_least.).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'single', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'hpa.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'pass.', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtsingle.cshigh.ftcpu.nml1.mtscale_sche_separated.scl(hpa.)(default.)(least_task.)[(careful_down.)].scd(pass.).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'single', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'hpa.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'rotate.', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtsingle.cshigh.ftcpu.nml1.mtscale_sche_separated.scl(hpa.)(default.)(least_task.)[(careful_down.)].scd(rotate.).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'single', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'lass.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'load_least.', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtsingle.cshigh.ftcpu.nml1.mtscale_sche_separated.scl(lass.)(default.)(least_task.)[(careful_down.)].scd(load_least.).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'single', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'lass.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'pass.', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtsingle.cshigh.ftcpu.nml1.mtscale_sche_separated.scl(lass.)(default.)(least_task.)[(careful_down.)].scd(pass.).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'single', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'temp_scaler.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'greedy.', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtsingle.cshigh.ftcpu.nml1.mtscale_sche_separated.scl(temp_scaler.)(default.)(least_task.)[(careful_down.)].scd(greedy.).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'single', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'temp_scaler.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'load_least.', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtsingle.cshigh.ftcpu.nml1.mtscale_sche_separated.scl(temp_scaler.)(default.)(least_task.)[(careful_down.)].scd(load_least.).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'single', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'temp_scaler.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'pass.', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtsingle.cshigh.ftcpu.nml1.mtscale_sche_separated.scl(temp_scaler.)(default.)(least_task.)[(careful_down.)].scd(pass.).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'single', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'temp_scaler.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'rotate.', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtsingle.cshigh.ftcpu.nml1.mtscale_sche_separated.scl(temp_scaler.)(default.)(least_task.)[(careful_down.)].scd(rotate.).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'dag', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'hpa.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'heft.', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtdag.cshigh.ftcpu.nml1.mtscale_sche_joint.scl(hpa.)(default.)(least_task.)[(careful_down.)].scd(heft.).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'dag', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'hpa.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'priority.a', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtdag.cshigh.ftcpu.nml1.mtscale_sche_joint.scl(hpa.)(default.)(least_task.)[(careful_down.)].scd(priority.a).ic(no_evict.)']
- [{'rand_seed': '', 'request_freq': 'low', 'dag_type': 'dag', 'cold_start': 'high', 'fn_type': 'cpu', 'scale_num': 'hpa.', 'scale_down_exec': 'default.', 'scale_up_exec': 'least_task.', 'sche': 'priority.b', 'instance_cache_policy': 'no_evict.', 'filter': '(careful_down.)', 'no_mech_latency': '1'}, 'sd.rflow.dtdag.cshigh.ftcpu.nml1.mtscale_sche_joint.scl(hpa.)(default.)(least_task.)[(careful_down.)].scd(priority.b).ic(no_evict.)']


## group on x axis:
Expand Down
34 changes: 18 additions & 16 deletions serverless_sim/module_conf_es.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"mech_type": {
"no_scale": null,
"scale_sche_separated": null,
"scale_sche_joint": null
"scale_sche_joint": null,
"no_scale": null
},
"scale_num": {
"rela": null,
"lass": null,
"temp_scaler": null,
"no": null,
"hpa": null,
"full_placement": null,
"ensure_scaler": null,
"no": null,
"lass": null,
"temp_scaler": null
"rela": null,
"ensure_scaler": null
},
"scale_down_exec": {
"default": null
Expand All @@ -21,25 +21,27 @@
"no": null
},
"sche": {
"consistenthash": null,
"ensure_scheduler": null,
"heft": null,
"random": null,
"hash": null,
"pass": null,
"faasflow": null,
"load_least": null,
"rotate": null,
"hash": null,
"pos": null,
"random": null,
"bp_balance": null,
"ensure_scheduler": null,
"fnsche": null,
"pos": null,
"greedy": null,
"pass": null
"consistenthash": null,
"load_least": null,
"bp_balance": null,
"priority": null
},
"filter": {
"careful_down": null
},
"instance_cache_policy": {
"lru": null,
"fifo": null,
"lru": null,
"no_evict": null
}
}
6 changes: 4 additions & 2 deletions serverless_sim/src/mechanism.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl<S: SameTarget> CheckDup for Vec<S> {
}
}

pub const SCHE_NAMES: [&'static str; 12] = [
pub const SCHE_NAMES: [&'static str; 14] = [
"rotate",
"hash",
"bp_balance",
Expand All @@ -91,6 +91,8 @@ pub const SCHE_NAMES: [&'static str; 12] = [
"consistenthash", // "gofs",
"ensure_scheduler",
"load_least",
"priority",
"heft"
// "load_least",
// "random",
];
Expand Down Expand Up @@ -222,7 +224,7 @@ impl ConfigNewMec for Config {
}
}
"scale_sche_joint" => {
let allow_sche = vec!["pos", "bp_balance", "ensure_scheduler"];
let allow_sche = vec!["pos", "bp_balance", "ensure_scheduler", "priority", "heft"];
let allow_scale_num = vec!["hpa", "lass", "temp_scaler", "full_placement", "rela", "ensure_scaler"];
let allow_scale_down_exec = vec!["default"];
let allow_scale_up_exec = vec!["least_task"];
Expand Down
10 changes: 5 additions & 5 deletions serverless_sim/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ impl Node {
Self {
node_id,
rsc_limit: NodeRscLimit {
// cpu: 1000.0,
cpu: 200.0,
cpu: 1000.0,
// cpu: 200.0,
mem: 8000.0,
},
fn_containers: HashMap::new().into(),
Expand Down Expand Up @@ -264,9 +264,9 @@ impl Node {
Box::new(move |to_replace| {
let node = node.as_ref();
// log::info!("节点{}要移除的容器{}", node.node_id, to_replace);
for (_k, v) in node.fn_containers.borrow().iter() {
// log::info!("{}", v.fn_id);
}
// for (_k, v) in node.fn_containers.borrow().iter() {
// log::info!("{}", v.fn_id);
// }
node.container(*to_replace).unwrap().is_idle()
}),
);
Expand Down
6 changes: 3 additions & 3 deletions serverless_sim/src/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,13 @@ impl SimEnv {

for (dag_i, &(mut avg_frequency, cv)) in env.help.fn_call_frequency().iter() {
if env.help.config().request_freq_low() {
avg_frequency *= 0.1;
avg_frequency *= 0.3;
}
else if env.help.config().request_freq_middle() {
avg_frequency *= 0.2;
avg_frequency *= 0.5;
}
else {
avg_frequency *= 0.3;
avg_frequency *= 0.7;
}
// avg_frequency *= 100.0;
// avg_frequency *= 10.0;
Expand Down
Loading