Skip to content

Support threads.count: auto (CPU-based dynamic thread count) #676

Description

@kriszyp

threads.count is set at install time based on the CPU count at that moment. If the instance is later resized (more/fewer CPUs), the thread count stays wrong until manually updated.

Ask

  • Accept threads.count: auto (or null) in the config, meaning Harper reads the available CPU count at startup and sets threads accordingly.
  • This means a resize + restart is all that's needed to pick up the new CPU count — no manual config edit.

Future extension

auto could eventually mean dynamic, on-demand thread creation based on load metrics — not in scope for this ticket.

Acceptance criteria

  • threads.count: auto (or null) works in harperdb-config.yaml.
  • Harper logs the computed thread count on startup.
  • Existing numeric values still work unchanged.
  • Documented.

🤖 Filed by Claude on behalf of Kris.

Metadata

Metadata

Assignees

Labels

area:clusteringMulti-thread/multi-process coordination, ITC, worker managementenhancementNew feature or requestfrom-jiraMigrated or originated from a Jira ticket

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions