Gentoo Archives: gentoo-amd64

From: Pawel Kraszewski <Gentoo@××××××××××.net>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Weird and unpredictable problem: emerge grinds system to a halt
Date: Thu, 28 Sep 2006 08:00:58
Message-Id: 200609280958.31254.Gentoo@kraszewscy.net
In Reply to: Re: [gentoo-amd64] Weird and unpredictable problem: emerge grinds system to a halt by Petter Haggholm
1 Dnia czwartek, 28 wrze¶nia 2006 09:24, Petter Haggholm napisa³:
2
3
4 > Without having tried it yet -- I need to finish some work first -- I'm
5 > curious about the MAKEOPTS thing, especially -j?. The other reply (so
6 > far) in this thread suggests -j1 and asserts that "[-j2] has no sense
7 > anyway, if you have no multicore or don't use distcc...". This is in
8 > contrast to all the recommended settings I have seen so far -- standard
9 > procedure seems to be -j$(no. cores+1), I presume so that one make
10 > process can do some CPU work while the other is I/O bound? I suppose one
11 > could keep the system more responsive at the cost of longer compiles by
12 > running only one make process, but I have never heard of anyone else
13 > having problems with -j2 on a single-core system ...
14
15 Well, problem is not CPU but memory. Having -j2 + kdeenablefinal + gcc-4 eats
16 ENORMOUS amounts of memory. This is the reason it kills some running
17 applications (as in your case). Put some memory usage monitor and observe,
18 especially the VM bar. In my system it goes up as if it had at least a foot
19 of scale to collect, not mere half an inch...
20
21 Remember that 'kdeenablefinal' works this way: it prepares application as one
22 huge source file and then compiles it. Without kdeenablefinal each .cc file
23 of app is compiled separately and then linked together, which significantly
24 decreases memory usage - it is easier to compile 100 1MB files than 1 100MB
25 file...
26
27 --
28 Pawel Kraszewski
29 www.kraszewscy.net
30
31 --
32 gentoo-amd64@g.o mailing list