Commit c5f860b6 authored by gerd's avatar gerd

addition of the -netlimit option


git-svn-id: https://gps.dynxs.de/private/svn/app-plasma/trunk@639 55289a75-7b90-4627-9e07-ffb4263930b2
parent 1e5861fd
......@@ -52,6 +52,7 @@ type runtime_job_config =
simulate : bool;
pre_sort_algo : string;
keep_temp_files : bool;
net_limit : int;
report : bool;
report_to : Netchannels.out_obj_channel;
res_conf : Mapred_rpc_aux.resource_config;
......@@ -83,6 +84,7 @@ let create_runtime_job_config
?(simulate=false)
?(pre_sort_algo = "DEFAULT")
?(keep_temp_files=false)
?(net_limit=1)
?(report=false)
?(report_to=new Netchannels.output_channel stderr)
mjc =
......@@ -110,6 +112,7 @@ let create_runtime_job_config
simulate;
pre_sort_algo;
keep_temp_files;
net_limit;
report;
report_to;
mjc = mjc;
......@@ -122,6 +125,7 @@ let create_runtime_job_config_from_mapred_config
?simulate
?pre_sort_algo
?keep_temp_files
?net_limit
?report
?report_to
mjc
......@@ -144,6 +148,7 @@ let create_runtime_job_config_from_mapred_config
?simulate
?pre_sort_algo
?keep_temp_files
?net_limit
?report
?report_to
mjc
......@@ -497,7 +502,7 @@ let start esys plan mj rjc mp tm me port when_done =
let (ip_io_load, ip_cpu_load, ip_net_load, _) = get_load ip in
ip_io_load +. io_weight +.
ip_cpu_load +. cpu_weight <= limit &&
ip_net_load +. net_weight <= 1.0
ip_net_load +. net_weight <= float rjc.net_limit
(* We add the new load to the existing load, and check
whether we are below the bounds
*)
......
......@@ -52,6 +52,7 @@ val create_runtime_job_config :
?simulate:bool ->
?pre_sort_algo:string ->
?keep_temp_files:bool ->
?net_limit:int ->
?report:bool ->
?report_to:Netchannels.out_obj_channel ->
Mapred_job_config.m_job_config ->
......@@ -60,6 +61,8 @@ val create_runtime_job_config :
task counts with a certain weight, given as [(io_weight,cpu_weight)]-
The sum of the I/O weights must not exceed [io_load], and the
sum of the CPU weights must not exceed [cpu_load].
[net_limit]: the number of allowed misallocated tasks per node
*)
val create_runtime_job_config_from_mapred_config :
......@@ -68,6 +71,7 @@ val create_runtime_job_config_from_mapred_config :
?simulate:bool ->
?pre_sort_algo:string ->
?keep_temp_files:bool ->
?net_limit:int ->
?report:bool ->
?report_to:Netchannels.out_obj_channel ->
Mapred_job_config.m_job_config ->
......
......@@ -424,6 +424,7 @@ let exec_job ?(options = fun _ -> []) me mj =
let dump_plan = ref false in
let dump_svg = ref None in
let keep_temp_files = ref false in
let net_limit = ref None in
let simulate = ref false in
let pre_sort_algo = ref "DEFAULT" in
let args = ref [] in
......@@ -461,6 +462,9 @@ let exec_job ?(options = fun _ -> []) me mj =
"-pre-sort-algo", Arg.Set_string pre_sort_algo,
"<name> Set the task pre-sort algorithm";
"-net-limit", Arg.Int (fun n -> net_limit := Some n),
"<n> The max allowed number of misallocated tasks per node";
"-debug", Arg.Unit (fun () -> level := `Debug; dump_plan := true),
" Enable Plasma debug messages";
......@@ -494,6 +498,7 @@ let exec_job ?(options = fun _ -> []) me mj =
~pre_sort_algo:!pre_sort_algo
~keep_temp_files:!keep_temp_files
~report:true
?net_limit:!net_limit
mjc
me#config in
......
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