Skip to content

Commit

Permalink
Document changes to benchmarking + print number of threads for displa…
Browse files Browse the repository at this point in the history
…y level >= 2
  • Loading branch information
daniellerozenblit committed Dec 11, 2024
1 parent 20f9e1e commit 0188db3
Show file tree
Hide file tree
Showing 2 changed files with 1,723 additions and 1,008 deletions.
5 changes: 4 additions & 1 deletion programs/zstd.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ If the value of `ZSTD_CLEVEL` is not a valid integer, it will be ignored with a

`ZSTD_NBTHREADS` can be used to set the number of threads `zstd` will attempt to use during compression.
If the value of `ZSTD_NBTHREADS` is not a valid unsigned integer, it will be ignored with a warning message.
`ZSTD_NBTHREADS` has a default value of (`min(4, nbCores/4`), and is capped at ZSTDMT_NBWORKERS_MAX==200.
`ZSTD_NBTHREADS` has a default value of (`min(4, nbCores/4)`), and is capped at ZSTDMT_NBWORKERS_MAX==200.
`zstd` must be compiled with multithread support for this variable to have any effect.

They can both be overridden by corresponding command line arguments:
Expand Down Expand Up @@ -664,9 +664,12 @@ BENCHMARK
The `zstd` CLI provides a benchmarking mode that can be used to easily find suitable compression parameters, or alternatively to benchmark a computer's performance.
`zstd -b [FILE(s)]` will benchmark `zstd` for both compression and decompression using default compression level.
Note that results are very dependent on the content being compressed.

It's possible to pass multiple files to the benchmark, and even a directory with `-r DIRECTORY`.
When no `FILE` is provided, the benchmark will use a procedurally generated `lorem ipsum` text.

Benchmarking will employ `min(4, nbCores/4)` worker threads by default in order to match the behavior of the normal CLI I/O.

* `-b#`:
benchmark file(s) using compression level #
* `-e#`:
Expand Down
Loading

0 comments on commit 0188db3

Please sign in to comment.