diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2021-11-09 16:30:05 +0800 |
---|---|---|
committer | Robert Yang <liezhi.yang@windriver.com> | 2021-11-09 16:46:25 +0800 |
commit | 5e10cddcd2697c7b762c8c8d245bb76f8666aefc (patch) | |
tree | 6ed1a19344868ad8c17bce5d9e3453c555e85843 | |
parent | afad2f09ebbfe395f8fafce8218e26056479fe39 (diff) | |
download | openembedded-core-contrib-5e10cddcd2697c7b762c8c8d245bb76f8666aefc.tar.gz |
bitbake.conf: Set ZSTD_THREADS to half of cpu numberrbt/zstd
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 <liezhi.yang@windriver.com>
-rw-r--r-- | meta/conf/bitbake.conf | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index 71c1e52ad6..46ebf5113f 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 |