1 |
Beso <givemesugarr@×××××.com> posted |
2 |
d257c3560808120130o55c0c805n69bda3ed4cb9a823@××××××××××.com, excerpted |
3 |
below, on Tue, 12 Aug 2008 08:30:44 +0000: |
4 |
|
5 |
> if you're still using something the kernel won't kill nothing. the |
6 |
> behaviour you're referencing is the kernel cached pages. when you use |
7 |
> something you load it into memory. after you finish using it then the |
8 |
> kernel will continue to hold the pages in ram as cached pages, if you |
9 |
> have enough space to be able to speed up the eventual future reuse of |
10 |
> that particular object. |
11 |
|
12 |
Beso, I think he was referring to being totally out of memory+swap, thus |
13 |
triggering the kernel OOM (out of memory) killer. |
14 |
|
15 |
Yes, that can happen. However, in practice, at least from my experience, |
16 |
before the kernel ever gets to the point of actually killing anything, |
17 |
the system becomes basically unresponsive anyway, as the kernel searches |
18 |
for every last bit of memory it can recover to use for whatever is taking |
19 |
it all. I've never had that happen since I switched to /tmp on tmpfs so |
20 |
I don't know how it works in regard to that -- presumably it'd consider |
21 |
it temporary and kill it before killing applications, but I don't know |
22 |
that for sure -- but I did have it happen once when I had swap turned off |
23 |
and only a gig of memory -- and tried to scan something at an incredibly |
24 |
high resolution that would have used over a gig of memory for the scan |
25 |
data alone, had I had it there to use! Even with swap turned off, the |
26 |
system was unusable, as the kernel was still looking for every bit of |
27 |
memory it could find some 15 minutes or so into unresponsiveness, when I |
28 |
gave up and hit the reset. I don't know how much longer it would have |
29 |
continued before triggering the OOM killer, but it wasn't worth waiting |
30 |
around to find out. |
31 |
|
32 |
BTW, I did have a runaway process once some-time later (before I set |
33 |
system per-process memory limits using ulimit, see "help ulimit" at the |
34 |
bash prompt), after I had upgraded to 8 gigs RAM, with 16 gigs swap as 4 |
35 |
partitions of 4 gigs each, on 4 different hard drives (with priority set |
36 |
equal so the kernel striped them for 4X swap speed). That worked much |
37 |
better as I didn't let it get quite out of memory before killing it, but |
38 |
I did let the process go long enough to have it eat up the 8 gigs of |
39 |
regular memory plus 15 gigs or so of swap before I killed it, just to see |
40 |
how responsive the system remained while nearly 16 gigs into swap after I |
41 |
had 4-way striped it. The system was a bit draggy at that, but it was |
42 |
certainly WAY more responsive than that time I let it get totally out of |
43 |
memory with NO swap, and responsive enough that I could still kill the |
44 |
runaway process when I decided it was getting too close to leaving me in |
45 |
the same situation again. (While I let it run until 15 out of 16 gigs |
46 |
swap were used, I had setup a high priority root shell with the kill -9 |
47 |
command waiting for me to hit enter... before it got far into swap, just |
48 |
in case.) I'd have hated to have been 16 gigs into swap on a single- |
49 |
spindle swap system, that's for sure! |
50 |
|
51 |
So anyway, make sure you have enough memory+swap to compile OOo, and you |
52 |
shouldn't have any major problems. FWIW, I set my max capacity on the |
53 |
tmpfs to 6 GB, since I knew OOo took 5+ gigs as the largest package, tho |
54 |
I've never actually compiled it. And of course with 8 gigs RAM and 16 |
55 |
gigs swap, I have 24 gigs mem+swap to play with, and the 6 gig max tmpfs |
56 |
doesn't get anywhere near that, so I'm fine. |
57 |
|
58 |
BTW, Chris G, one of the devs in the game herd, has mentioned that there |
59 |
are a couple game-data packages that actually require more scratch-space |
60 |
to merge than OOo, but of course they aren't compiled, so if the system |
61 |
runs out of room installing them, no big deal, just create a sufficiently |
62 |
large temporary swap file or switch PORTAGE_TMPDIR back to disk |
63 |
temporarily, and retry. It's not like you're losing hours of work like |
64 |
would be possible if OOo ran out of room while emerging. Plus at least |
65 |
personally, I don't have to worry about that since the games in question |
66 |
aren't freedomware anyway, so I'd never install them in the first place. |
67 |
|
68 |
-- |
69 |
Duncan - List replies preferred. No HTML msgs. |
70 |
"Every nonfree program has a lord, a master -- |
71 |
and if you use the program, he is your master." Richard Stallman |