diff --git a/ballista/executor/executor_config_spec.toml b/ballista/executor/executor_config_spec.toml index 389d7f44b9..311859478a 100644 --- a/ballista/executor/executor_config_spec.toml +++ b/ballista/executor/executor_config_spec.toml @@ -75,7 +75,6 @@ doc = "Directory for temporary IPC files" abbr = "c" name = "concurrent_tasks" type = "usize" -default = "0" # defaults to all available cores if left as zero doc = "Max concurrent tasks." [[param]] diff --git a/ballista/executor/src/config.rs b/ballista/executor/src/config.rs index 78db477f9b..9b85fdace1 100644 --- a/ballista/executor/src/config.rs +++ b/ballista/executor/src/config.rs @@ -35,6 +35,11 @@ impl TryFrom for ExecutorProcessConfig { opt.bind_port ); + let concurrent_tasks = opt + .concurrent_tasks + .or(opt.executor_cores) + .unwrap_or_else(|| std::thread::available_parallelism().unwrap().get()); + Ok(ExecutorProcessConfig { special_mod_log_level: opt.log_level_setting, external_host: opt.external_host, @@ -44,7 +49,7 @@ impl TryFrom for ExecutorProcessConfig { scheduler_host: opt.scheduler_host, scheduler_port: opt.scheduler_port, scheduler_connect_timeout_seconds: opt.scheduler_connect_timeout_seconds, - concurrent_tasks: opt.concurrent_tasks, + concurrent_tasks, task_scheduling_policy: opt.task_scheduling_policy, work_dir: opt.work_dir, log_dir: opt.log_dir,