From: Robert Yang Date: Tue, 9 Nov 2021 08:30:05 +0000 (+0800) Subject: bitbake.conf: Set ZSTD_THREADS to half of cpu number X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e10cddcd2697c7b762c8c8d245bb76f8666aefc;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake.conf: Set ZSTD_THREADS to half of cpu number The original value is very easy to cause do_packge error when cpu number is larger, for example, 128 cores and 512G mem: error: create archive failed: cpio: write failed - Cannot allocate memory" Set the ZSTD_THREADS to half of the CPU number can avoid the error in my testing. Signed-off-by: Robert Yang --- diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 71c1e52ad63..46ebf5113f6 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -833,7 +833,7 @@ XZ_DEFAULTS ?= "--memlimit=${XZ_MEMLIMIT} --threads=${XZ_THREADS}" XZ_DEFAULTS[vardepsexclude] += "XZ_MEMLIMIT XZ_THREADS" # Default parallelism for zstd -ZSTD_THREADS ?= "${@oe.utils.cpu_count(at_least=2)}" +ZSTD_THREADS ?= "${@int(oe.utils.cpu_count(at_least=4)/2)}" ZSTD_THREADS[vardepvalue] = "1" # Limit the number of threads that OpenMP libraries will use. Otherwise they