Is there any reason why bsdtar is built without XZ multi-threading support? It's not documented in the man page, so maybe it's an experimental feature. Can be tested with this command: tar -Jcf /dev/null --options xz:threads=4 $HOME After setting HAVE_LZMA_STREAM_ENCODER_MT, it works as expected: Index: lib/libarchive/Makefile ==================================================================--- lib/libarchive/Makefile (revision 340812) +++ lib/libarchive/Makefile (working copy) @@ -7,7 +7,7 @@ LIB= archive LIBADD= z bz2 lzma bsdxml -CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 +CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 -DHAVE_LZMA_STREAM_ENCODER_MT=1 # FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system. # It has no real relation to the libarchive version number.
on Sat Nov 24 08:47:18 UTC 2018 Stefan wrote:> Is there any reason why bsdtar is built without XZ multi-threading support?> It's not documented in the man page, so maybe it's an experimental feature.> Can be tested with this command: > tar -Jcf /dev/null --options xz:threads=4 $HOME> After setting HAVE_LZMA_STREAM_ENCODER_MT, it works as expected:My lord, indeed. A careful inspector you are. This speciality makes an appearance in ports libachive but not libarchive in base. I bet you already had this intuition all along. $ /usr/local/bin/bsdtar cpJ --options xz:threads=2 -f /dev/null temp & $ ps -o pid,user,args -H $! PID USER COMMAND 1655 miltonott /usr/local/bin/bsdtar cpJ --options xz:threads=2 -f /dev/null temp 1655 miltonott /usr/local/bin/bsdtar cpJ --options xz:threads=2 -f /dev/null temp 1655 miltonott /usr/local/bin/bsdtar cpJ --options xz:threads=2 -f /dev/null temp Bah, now I need to research why I see three and not two.
On 11/24/18 9:47 AM, Stefan Ehmann wrote:> Is there any reason why bsdtar is built without XZ multi-threading support? > > It's not documented in the man page, so maybe it's an experimental feature. > > Can be tested with this command: > tar -Jcf /dev/null --options xz:threads=4 $HOME > > After setting HAVE_LZMA_STREAM_ENCODER_MT, it works as expected:PR created: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233543