You are not logged in.

#1 2024-08-04 09:45:43

aljustiet
Member
Registered: 2024-02-09
Posts: 69
Website

How can I make zstd use all cpu threads?

When compressing the package from the AUR, zstd uses maximally 100%. I guess that means cpu 1 core. How can I make it use all my cpu cores to compress the package faster? htop

Offline

#2 2024-08-04 09:57:01

gromit
Package Maintainer (PM)
From: Germany
Registered: 2024-02-10
Posts: 480
Website

Re: How can I make zstd use all cpu threads?

Which compression options for zstd do you have set in /etc/makepkg.conf? See i.e. the output of "grep -i zstd /etc/makepkg.conf"

If you just keep packages locally you can also just disable compression at all smile

Offline

#3 2024-08-04 10:10:00

aljustiet
Member
Registered: 2024-02-09
Posts: 69
Website

Re: How can I make zstd use all cpu threads?

gromit wrote:

Which compression options for zstd do you have set in /etc/makepkg.conf? See i.e. the output of "grep -i zstd /etc/makepkg.conf"

If you just keep packages locally you can also just disable compression at all smile

COMPRESSZST=(zstd -c -T0 --ultra -20 -)

I wanna compress the packages, because I have 223.5 GiB drive.

Offline

#4 2024-08-04 10:30:21

gromit
Package Maintainer (PM)
From: Germany
Registered: 2024-02-10
Posts: 480
Website

Re: How can I make zstd use all cpu threads?

"-T0" should autodetect with the amount of cores on your system (similar to "-j$(nproc)" for make), so I guess you already have the right options set for multicore compression. However I guess zstd can not utilize all cores at all times, so maybe its only really multicore in the beginning.

Offline

#5 2024-08-04 13:15:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,217
Website

Re: How can I make zstd use all cpu threads?

-T0 detection is based, by default, on the number of physical not logical cores.  But this default can be changed.  Try adding "--auto-threads=logical".


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2024-08-04 14:01:42

Maniaxx
Member
Registered: 2014-05-14
Posts: 757

Re: How can I make zstd use all cpu threads?

Try reducing -20 to -19.


sys2064

Offline

Board footer

Powered by FluxBB