Skip to content

Backport v2022 <- v2023: Explicitly set the number of threads

Dylan Aïssi requested to merge apertis/v2023 into apertis/v2022-updates

The xz compression is currently being configured to use a number of worker threads equal to the processors on the system being used. This is generally OK, however in some instances we compile packages on large machines, with as many as 160 CPU cores. This results in memory allocation issues:

roundTripTest: datagen -g8M  | zstd -v19 -T0 --long | zstd -d19 -T0 --long
[  253s]
[  253s] *** zstd command line interface 32-bits v1.4.8, by Yann Collet ***
[  253s] Note: 160 physical core(s) detected
[  253s] zstd: error 11 : Allocation error : not enough memory
[  253s] zstd: /*stdin*\: unexpected end of file
[  253s] Files tmp1 and tmp2 differ
[  253s] make[2]: *** [Makefile:330: test-zstd] Error 1
[  253s] make[2]: *** Waiting for unfinished jobs....
[  253s]

By using -T0, it results in the number of threads being equal to the number of CPU cores. Thus, set the number of threads explicitly to a low number

Signed-off-by: Ritesh Raj Sarraf ritesh.sarraf@collabora.com

Merge request reports

Loading