Gentoo Archives: gentoo-user

From: Michael Mol <mikemol@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] xz memory hungry?
Date: Wed, 22 Aug 2012 21:16:35
Message-Id: CA+czFiBg=YN7Gc7ZybzxVJ30PcsC_DDjRCkEnsWuW8_e5CCasw@mail.gmail.com
In Reply to: Re: [gentoo-user] xz memory hungry? by Florian Philipp
1 On Wed, Aug 22, 2012 at 4:43 PM, Florian Philipp <lists@×××××××××××.net> wrote:
2 > Am 22.08.2012 22:32, schrieb Jorge Almeida:
3 >> On Wed, Aug 22, 2012 at 8:05 PM, Michael Mol <mikemol@×××××.com> wrote:
4 >>> On Wed, Aug 22, 2012 at 2:52 PM, Jorge Almeida <jjalmeida@×××××.com> wrote:
5 >>>> # tar -xJvf /usr/portage/distfiles/m4-1.4.16.tar.xz
6 >>>> xz: (stdin): Cannot allocate memory
7 >>>>
8 >>>> The box has 2G ram + 1G swap. I'm installing Gentoo from an existing distro.
9 >>>
10 >>> How much do you have free? From xz's manpage:
11 >>
12 >> Almost all of it! It's a one-user workstation, which was essentialy idle.
13 >>>
14 >>>
15 >> I read the man page of xz, but it suggested nothing to me.
16 >>>
17 >>> Three things come to mind:
18 >>>
19 >>> 1) You may not have enough memory free
20 >>> 2) There may be a bug (either compile/link-induced or code-induced) in
21 >>> the copy of xz you're using
22 >>> 3) Upstream used some insane settings, causing a massive increase in
23 >>> the amount of RAM required to decompress that stream.
24 >>>
25 >>>
26 >>> You could download the .tar.xz file, decompress it on a different box,
27 >>> and then recompress it with lighter settings.
28 >>>
29 >>> unxz filename.tar.xz
30 >>> xz -1 filename.tar
31 >>>
32 >> Done that. It extracts now, so 3) is the correct hypothesis, and "insane" is
33 >> really the appropriate word. Of course, the hash digests are now wrong, so
34 >> emerge still fails. Any idea how to find which amount of memory is needed? I
35 >> would setup appropriate swap, if possible. [...]
36 >
37 > There is a table in `man xz` showing the memory requirements. Even with
38 > the highest setting, you only need 65 MB memory for decompression (674
39 > MB for compression, though).
40
41 Still not sure about this portion: "Still, it is possible to have .xz files that
42 require several giga‐bytes of memory to decompress."
43
44 But, yeah, this seems very wonky.
45
46 --
47 :wq