Commit 9c5e55a
committed
image/compress-checksum: cap compression threads (default 32)
Threads were set to full nproc, so a 128-core host grabbed ~91 threads
for a single large xz job. xz speedup is sublinear past ~16-32 threads
and its ratio slightly worsens (more independent blocks), while peak
memory grows linearly (~674MB/thread at -9) — ~91 threads reserved
~61GB for marginal wall-time gain.
Cap compress_threads to min(nproc, 32). The cap propagates to the xz
per-file thread clamp, the xz level-walk memory check, and zstd. Add a
COMPRESS_MAX_THREADS override (set >= nproc to disable) and surface the
cap in the 'Compression host' diagnostic line.
Signed-off-by: Igor Pecovnik <igor@armbian.com>1 parent 186062c commit 9c5e55a
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
33 | 39 | | |
| 40 | + | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
| |||
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
100 | | - | |
| 107 | + | |
101 | 108 | | |
102 | 109 | | |
103 | 110 | | |
| |||
0 commit comments