GNU Jobserver support
- Dominant language
- C
- Stars
- 27.9k
- Forks
- 2.6k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
**Is your feature request related to a problem? Please describe.**
When running multiple `zstd` processes in parallel, it's difficult to know how many threads to give to each process. Giving each process as many threads as available results in oversubscription, given them only 1 may not be optimal use of resources.
**Describe the solution you'd like**
GNU Make has this concept of a jobserver, which ensures that `make -j ` doesn't run more than `n` jobs in parallel (recursively). It is widely supported (e.g. gcc's LTO spawns parallel jobs from gcc respecting the job server, clang, cargo, ...) and is trivial to implement: https://www.gnu.org/software/make/manual/html_node/POSIX-Jobserver.html.
This way, `make -j n` can be used to control the concurrency, and any `zstd` process could automatically take as many jobs as available to compress / decompress.
**Additional context**
This is particularly useful when Makefiles (or any other program conforming to the GNU Make jobserver) are used to create and compress multiple tarballs.
Contributor guide
Assessment
This issue has not been assessed yet.