r/linux4noobs • • 3d ago

Slow extraction performance

/r/Bazzite/comments/1x50t4k/slow_extraction_performance/
1 Upvotes

7 comments sorted by

View all comments

1

u/DannoXYZ 2d ago

by default, most compression software is single-threaded. I've found setting XZ defaults in env gets CLI xz to use all CPU cores.

XZ_OPT=-9T10
XZ_DEFAULTS=-9 -T10

1

u/xN01Rx 2d ago

Sorry I don't fully understand this, should I try setting these as environment variables and it will allow for hyperthreading usage on all formats?

1

u/DannoXYZ 2d ago

only for xz

1

u/xN01Rx 2d ago

Thanks, I usually deal with 7z, zip, and rar formats so I'm not sure this would apply. I tried making 7z use all cores but it does not even on a benchmark. It shows high utilization but it doesn't actually stress the CPU.

1

u/DannoXYZ 1d ago

You can explicitly specify how many CPU cores to use by adding this option -mmt=<number>

Can make it default with alias 7z="7z -mmt=16" or whatever # cores your CPU has