]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Update manual about the default value of `-T#`/`--threads=#` 4474/head
authorJamie Lokier <jamie@shareable.org>
Tue, 2 Sep 2025 15:44:09 +0000 (16:44 +0100)
committerJamie Lokier <jamie@shareable.org>
Tue, 2 Sep 2025 15:44:39 +0000 (16:44 +0100)
The section about `ZSTD_NBTHREADS` already explains the default number of
threads, since it changed from 1 (commit 17beeb5).  But the option description
for `-T#`/`--threads=#` incorrectly said the default was still 1.

I noticed this when I found compression slower with `-T1` than without it.

programs/zstd.1
programs/zstd.1.md

index 5503a5b86f4acf0be8a731e92b4f6e4a92ece3f7..e49a182d5068e091a3f200845c3fd09928a1a009 100644 (file)
@@ -108,7 +108,7 @@ Display information related to a zstd compressed file, such as size, ratio, and
 \fB\-\-fast[=#]\fR: switch to ultra\-fast compression levels\. If \fB=#\fR is not present, it defaults to \fB1\fR\. The higher the value, the faster the compression speed, at the cost of some compression ratio\. This setting overwrites compression level if one was set previously\. Similarly, if a compression level is set after \fB\-\-fast\fR, it overrides it\.
 .
 .IP "\(bu" 4
-\fB\-T#\fR, \fB\-\-threads=#\fR: Compress using \fB#\fR working threads (default: 1)\. If \fB#\fR is 0, attempt to detect and use the number of physical CPU cores\. In all cases, the nb of threads is capped to \fBZSTDMT_NBWORKERS_MAX\fR, which is either 64 in 32\-bit mode, or 256 for 64\-bit environments\. This modifier does nothing if \fBzstd\fR is compiled without multithread support\.
+\fB\-T#\fR, \fB\-\-threads=#\fR: Compress using \fB#\fR working threads (default: between 1 and 4 depending on physical CPU cores; see \fBZSTD_NBTHREADS\fR below)\. If \fB#\fR is 0, attempt to detect and use the number of physical CPU cores\. In all cases, the nb of threads is capped to \fBZSTDMT_NBWORKERS_MAX\fR, which is either 64 in 32\-bit mode, or 256 for 64\-bit environments\. This modifier does nothing if \fBzstd\fR is compiled without multithread support\.
 .
 .IP "\(bu" 4
 \fB\-\-single\-thread\fR: Use a single thread for both I/O and compression\. As compression is serialized with I/O, this can be slightly slower\. Single\-thread mode features significantly lower memory usage, which can be useful for systems with limited amount of memory, such as 32\-bit systems\.
index cf1810d59b186d96cc7a63a30c4662b4b83e431d..bb9258d571b9f494a156ab147b6ebe22ef775b00 100644 (file)
@@ -126,7 +126,7 @@ the last one takes effect.
     This setting overwrites compression level if one was set previously.
     Similarly, if a compression level is set after `--fast`, it overrides it.
 * `-T#`, `--threads=#`:
-    Compress using `#` working threads (default: 1).
+    Compress using `#` working threads (default: between 1 and 4 depending on physical CPU cores; see `ZSTD_NBTHREADS` below).
     If `#` is 0, attempt to detect and use the number of physical CPU cores.
     In all cases, the nb of threads is capped to `ZSTDMT_NBWORKERS_MAX`,
     which is either 64 in 32-bit mode, or 256 for 64-bit environments.