xz-utils 5.2.x now has multi-thread support and significantly cuts the compression time for the same compressed size file.As it looks like mender-convert docker image is based upon 19.10, then xz-utils 5.2.x is installed and has multi-threading option available.
On a quad core cpu with hypertheading (8 threads) the following was my findings with a 20GB mender disk image.
with xz -k -9 foo.img (single-thread, 20GB img file => 557MB in):
with xz -k -9 --threads=0 foo.img (8 threads, 20GB img file => 565MB in):
with pxz --best --force foo.img (? threads, 20GB img file => 565MB in):
with pxz --best --force -T8 (8 threads, 20GB img file => 565MB in):