I figured out that my default is: ulimit -d 1572864
echo "1572864/1024" | bc 1536 Value, which lets me compress using this setting is between 1682864 and 1672864 kilobytes. I have also discovered command line option for xz --memlimit= Now my command looks that: cat archive.tar | xz -zf --memlimit=1600MiB \ --format=xz -9e --threads=2 - > archive.tar.xz but I get: xz: Adjusted the number of threads from 2 to 1 to not exceed the memory usage limit of 1600 MiB 1600 is clearly larger than 674*2=1348 In the end I can compress, but I think that something is wrong. Od: "Christian Weisgerber" <na...@mips.inka.de> Do: "Lampshade" <lampsh...@poczta.fm>; Wysłane: 16:25 Sobota 2016-01-30 Temat: Re: xz: (stdin): Cannot allocate memory > Lampshade: > > > I have following error: > > cat archive.tar | xz -zf --format=xz -9e --threads=2 - > archive.tar.xz > > xz: (stdin): Cannot allocate memory > > You are using the most extreme compression setting, which requires > about 674 MB per thread according to the xz(1) man page. This > causes you to bump against the data size limit (ulimit -d, see > ksh(1)). > > You need to raise the limit or use a less greedy compression setting. > > -- > Christian "naddy" Weisgerber na...@mips.inka.de