Merge pull request #7025 from influxdata/jrb_6_compactor_query_thread_default
chore: change default for compactor_config.query_exec_thread_countpull/24376/head
commit
49b9794869
|
@ -72,13 +72,13 @@ pub struct Compactor2Config {
|
|||
|
||||
/// Number of threads to use for the compactor query execution,
|
||||
/// compaction and persistence.
|
||||
/// If not specified, defaults to one less than the number of cores on the system
|
||||
#[clap(
|
||||
long = "query-exec-thread-count",
|
||||
env = "INFLUXDB_IOX_QUERY_EXEC_THREAD_COUNT",
|
||||
default_value = "4",
|
||||
action
|
||||
)]
|
||||
pub query_exec_thread_count: usize,
|
||||
pub query_exec_thread_count: Option<usize>,
|
||||
|
||||
/// Size of memory pool used during compaction plan execution, in
|
||||
/// bytes.
|
||||
|
|
|
@ -468,7 +468,7 @@ impl Config {
|
|||
compaction_job_concurrency: NonZeroUsize::new(1).unwrap(),
|
||||
compaction_partition_scratchpad_concurrency: NonZeroUsize::new(1).unwrap(),
|
||||
compaction_partition_minute_threshold: 10,
|
||||
query_exec_thread_count: 1,
|
||||
query_exec_thread_count: Some(1),
|
||||
exec_mem_pool_bytes,
|
||||
max_desired_file_size_bytes: 30_000,
|
||||
percentage_max_file_size: 30,
|
||||
|
|
|
@ -106,9 +106,15 @@ pub async fn command(config: Config) -> Result<(), Error> {
|
|||
StorageId::from("iox_scratchpad"),
|
||||
);
|
||||
|
||||
let num_threads = config
|
||||
.compactor_config
|
||||
.query_exec_thread_count
|
||||
.unwrap_or_else(|| num_cpus::get() - 1_usize);
|
||||
info!(%num_threads, "using specified number of threads");
|
||||
|
||||
let exec = Arc::new(Executor::new_with_config(ExecutorConfig {
|
||||
num_threads: config.compactor_config.query_exec_thread_count,
|
||||
target_query_partitions: config.compactor_config.query_exec_thread_count,
|
||||
num_threads,
|
||||
target_query_partitions: num_threads,
|
||||
object_stores: [&parquet_store_real, &parquet_store_scratchpad]
|
||||
.into_iter()
|
||||
.map(|store| (store.id(), Arc::clone(store.object_store())))
|
||||
|
|
Loading…
Reference in New Issue