find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs xz
The quick check confirms that xz runs single-threaded [even with -T0].
A shell script can implement parallelism for cases such as this. A similar task scheme appears in dracut. At one time [~2014] these files: 90kernel-modules/module-setup.sh 40network/module-setup.sh contained code that I wrote: # Use two parallel streams to filter alternating modules. local merge side2 ( ( local _f1 _f2 while read _f1; do echo "$_f1" if read _f2; then echo "$_f2" 1>&${side2}; fi done \ | bmf1 1>&${merge} ) {side2}>&1 \ | bmf1 ) {merge}>&1 /bin/bash has some extended features which facilitate allocating and using the file descriptors; see "REDIRECTION" in $(man bash). For other shells: hard-wire the fd to fixed integers, document it, and prevent collisions "manually". --