TUI: scale CPU core-toggle granularity by core count
Cap the cores-per-row group size (and the dashboard 'g' cycle) by total core count so the toggleable-row count stays sensible and small machines get finer control: ≤4 cores toggle individually (size 1), 5-8 cores in groups of up to 2, and more than 8 in groups of up to 4. The cap is also the default — the prior fixed default of 4 now clamps to the tier (1/2/4), and an explicit --cpu-group-size is clamped to the cap too. Add max_group_size() in cpu_groups; update the help text and the cpu_groups / control tests (the cycle test now uses 16 cores so it can exercise sizes 4/2/1). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+6
-5
@@ -125,11 +125,12 @@ struct Args {
|
||||
#[arg(long, value_name = "SPEC")]
|
||||
cpu_cores: Option<String>,
|
||||
|
||||
/// Cores per CPU mining row (default 4). Each row runs one shared solve
|
||||
/// across its cores; larger groups cut memory sharply: total RAM is ~4 GB ×
|
||||
/// (enabled cores / this size). Use 1 for one row (and one solve) per core.
|
||||
/// Rows are aligned to core-index blocks of this size, so a row never
|
||||
/// straddles a boundary. Cycle it live in the dashboard with 'g'.
|
||||
/// Cores per CPU mining row. Each row runs one shared solve across its
|
||||
/// cores; larger groups cut memory sharply: total RAM is ~4 GB × (enabled
|
||||
/// cores / this size). Rows align to core-index blocks of this size. Capped
|
||||
/// by core count so the row count stays manageable — ≤4 cores toggle
|
||||
/// individually (1), 5-8 cores in groups of ≤2, more than 8 in groups of ≤4
|
||||
/// — and the default is that cap. Cycle it live (within the cap) with 'g'.
|
||||
#[arg(long, value_name = "N", default_value_t = 4)]
|
||||
cpu_group_size: usize,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user