Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] mysqld invoked oom-killer
Date: Fri, 22 Jul 2011 20:05:39
Message-Id: 4E29CED7.50207@gmail.com
In Reply to: Re: [gentoo-user] mysqld invoked oom-killer by Peter Humphrey
1 Peter Humphrey wrote:
2 > On Friday 22 July 2011 19:13:35 Grant wrote:
3 >
4 >
5 >> Wouldn't a sufficiently large swap (100GB for example) completely prevent
6 >> out of memory conditions and the oom-killer?
7 >>
8 > Of course, on any system with more than a few dozen MB of RAM, but I can't
9 > imagine any combination of running programs whose size could add up to even
10 > a tenth of that, with or without library sharing (somebody will be along
11 > with an example in a moment). For instance I'm running four instances of
12 > BOINC projects here, one on each core, with oodles of space to spare and no
13 > swapping. Mind you, I do have 16GB RAM :-)
14 >
15 > Having said that I ought to go and shrink my swap partitions, but my disks
16 > are only half-allocated already, so I don't see the point.
17 >
18 >
19
20
21 This sounds like me. I have 16Gbs here too. I have 1Gb of swap . . . .
22 because it has always worked for me. I should have made it 300Mbs tho.
23 The only reason I want swap is to prevent a crash long enough to maybe
24 do something about it.
25
26 This is just my opinion. Unless you are strapped for memory, mobo can't
27 have that much, you only need a few hundred Mbs really. All you need is
28 enough to prevent a crash and let you know when you are running short.
29 If you have a mobo that maxes out at 1Gb or something, then you may want
30 some swap with enough space to make up for the shortage of ram,
31 realizing of course that it is going to slow things down, most likely a
32 lot.
33
34 If my main rig starts using swap a lot, I'm going to be very curious. I
35 even used 8Gbs to put portages work directory on tmpfs. I still didn't
36 use any swap. By the way, that doesn't seem to make the compiles any
37 faster. o_O
38
39 One other thing, don't forget you can adjust swapiness to control how
40 bad thigns get before it starts using swap. A setting of 100 will use
41 swap in a hurry and put about anything in it. I setting of 10, 20 or
42 something means it will only use swap if it is out of ram and it can't
43 make any available.
44
45 Man it's hot here.
46
47 Dale
48
49 :-) :-)

Replies

Subject Author
Re: [gentoo-user] mysqld invoked oom-killer Grant <emailgrant@×××××.com>