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
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ public abstract class AuronConfiguration {
.withKey("auron.tokio.worker.threads.per.cpu")
.withCategory("Runtime Configuration")
.withDescription(
"Number of Tokio worker threads to create per CPU core (spark.task.cpus). Set to 0 for automatic detection "
+ "based on available CPU cores. This setting controls the thread pool size for Tokio-based asynchronous operations.")
.withDefaultValue(0);
"Number of Tokio worker threads to create per CPU core (spark.task.cpus). Each task creates its own "
+ "Tokio runtime, so the default of 1 sizes it to the task's CPU allocation. Set to 0 to use "
+ "all available CPU cores of the host for every task, which can create a very large number "
+ "of threads on many-core machines.")
.withDefaultValue(1);

public static final ConfigOption<Integer> SUGGESTED_BATCH_MEM_SIZE = new ConfigOption<>(Integer.class)
.withKey("auron.suggested.batch.memSize")
Expand Down
4 changes: 2 additions & 2 deletions native-engine/auron/src/rt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ impl NativeExecutionRuntime {
);

let num_worker_threads = {
let worker_threads_per_cpu = TOKIO_WORKER_THREADS_PER_CPU.value().unwrap_or(0);
let task_cpus = TASK_CPUS.value().unwrap_or(0);
let worker_threads_per_cpu = TOKIO_WORKER_THREADS_PER_CPU.value().unwrap_or(1);
let task_cpus = TASK_CPUS.value().unwrap_or(1);
worker_threads_per_cpu * task_cpus
};

Expand Down