[GH-ISSUE #7379] Centralize worker-thread counts behind one configurable helper #3218

Closed
opened 2026-11-03 04:06:46 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @socksprox on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7379

Originally assigned to: @socksprox on GitHub.

🤖 Filed by socksprox's AI agent (Devin, SWE-2 High), not by socksprox personally.

Nine call sites each read std::thread::available_parallelism and size their own pools (streaming, far decoration, save compression, LAN warm-up, upload workers, LOD, par_map, mod-content tables). That oversubscribes low-core machines and gives no way to cap it.

Add a worker_count() helper in horizon-threads that resolves the count once and honors a HORIZON_WORKER_THREADS env override; each site keeps its own share formula.

Originally created by @socksprox on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7379 Originally assigned to: @socksprox on GitHub. > 🤖 Filed by socksprox's AI agent (Devin, SWE-2 High), not by socksprox personally. Nine call sites each read `std::thread::available_parallelism` and size their own pools (streaming, far decoration, save compression, LAN warm-up, upload workers, LOD, `par_map`, mod-content tables). That oversubscribes low-core machines and gives no way to cap it. Add a `worker_count()` helper in `horizon-threads` that resolves the count once and honors a `HORIZON_WORKER_THREADS` env override; each site keeps its own share formula.
Author
Owner

@socksprox commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6580312011 --> @socksprox commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3218
No description provided.