Skip to content

Add thread multiplier configurations to worker/config_native.properties#218

Open
karthikeyann wants to merge 1 commit intomainfrom
karthikeyann-config-threads-worker-1
Open

Add thread multiplier configurations to worker/config_native.properties#218
karthikeyann wants to merge 1 commit intomainfrom
karthikeyann-config-threads-worker-1

Conversation

@karthikeyann
Copy link
Contributor

Added configuration options for thread multipliers in HTTP and connector executors.

There are total 10 hw-multiplier in https://github.com/prestodb/presto/blob/e1006483a1d6f5470a8d4229b7805cf08301d92e/presto-native-execution/presto_cpp/main/common/Configs.h#L198
Listed only 8 of them.
Enabled only 5 of them.

Added configuration options for thread multipliers in HTTP and connector executors.
@karthikeyann
Copy link
Contributor Author

@devavret @zoltan @majetideepak please review them, in context of

  1. GPU worker with ucx-exchange
  2. Single GPU worker without ucx-exchange
  3. CPU worker
  4. CPU worker with http exchange

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds thread multiplier configuration entries to the worker native config template to allow tuning executor thread counts relative to hardware concurrency.

Changes:

  • Documented and introduced multiple *-hw-multiplier thread settings in config_native.properties.
  • Enabled several of these multipliers by setting explicit values (e.g., HTTP + exchange executors, connector IO).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


# Each multiplier value affects number of threads used for each module.
# hw_concurrency x multiplier.
# 1.0 is default for each multiplier config.
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says "1.0 is default for each multiplier config", but later comments list different defaults (e.g., connector defaults to 0.0, driver to 4.0, spiller to 1.0). Please correct this line to reflect that defaults vary per setting (or update the per-setting default comments to match reality).

Suggested change
# 1.0 is default for each multiplier config.
# Default values differ per multiplier; see per-setting comments below.

Copilot uses AI. Check for mistakes.
# If 0.0 then connector preload/prefetch is disabled.
# 0.0 is default.
connector.num-io-threads-hw-multiplier=0.01
# Number of threeads for Driver CPU executor
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in comment: "threeads" should be "threads".

Suggested change
# Number of threeads for Driver CPU executor
# Number of threads for Driver CPU executor

Copilot uses AI. Check for mistakes.
Comment on lines +48 to +52
#driver.num-cpu-threads-hw-multiplier
# Number of threads for Spiller CPU executor
# If 0.0 then spilling is disabled.
# 1.0 is default.
#spiller.num-cpu-threads-hw-multiplier
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commented-out examples for driver/spiller multipliers omit an '=' and example/default value (unlike the connector example above). This makes it harder to discover the intended configuration value and increases the chance of misconfiguration; consider adding the explicit default/example values (e.g., "...=4.0" / "...=1.0") or otherwise standardizing how these properties are documented.

Suggested change
#driver.num-cpu-threads-hw-multiplier
# Number of threads for Spiller CPU executor
# If 0.0 then spilling is disabled.
# 1.0 is default.
#spiller.num-cpu-threads-hw-multiplier
#driver.num-cpu-threads-hw-multiplier=4.0
# Number of threads for Spiller CPU executor
# If 0.0 then spilling is disabled.
# 1.0 is default.
#spiller.num-cpu-threads-hw-multiplier=1.0

Copilot uses AI. Check for mistakes.
@devavret
Copy link
Contributor

devavret commented Feb 6, 2026

What is the context of this? Were the high default values causing slowdowns?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants