Gentoo Archives: gentoo-user

From: Grant <emailgrant@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] mysqld invoked oom-killer
Date: Fri, 22 Jul 2011 01:30:54
Message-Id: CAN0CFw0jbO2k8uf4i4wQVsk7jkUcjmhdp8ZNH7_FRNqOZ49tzQ@mail.gmail.com
In Reply to: Re: [gentoo-user] mysqld invoked oom-killer by Albert Hopkins
1 >> Its more how much i/o rather than the size. If you have a bunch of
2 >> stuff swapped out, but it hardly ever needs to be swapped in, the
3 >> impact will be low.
4 >>
5 >> Keep an eye on the use with vmstat;
6 >>
7 >> adam@rix ~ $ vmstat 5
8 >> procs -----------memory---------- ---swap-- -----io---- -system--
9 >> ----cpu----
10 >>  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us
11 >> sy id wa
12 >>  0  0  56700 351244  79564 207848    0    0     3     3   11    7  1
13 >> 0 99  0
14 >>  0  0  56700 351244  79564 207848    0    0     0     8   52   27  0
15 >> 0 100  0
16 >>  0  0  56700 351244  79564 207848    0    0     0     0   45   14  0
17 >> 0 100  0
18 >>  0  0  56700 351244  79564 207848    0    0     0     0   47   17  0
19 >> 0 100  0
20 >>
21 >> from the man page;
22 >>    Swap
23 >>        si: Amount of memory swapped in from disk (/s).
24 >>        so: Amount of memory swapped to disk (/s).
25 >>
26 >>
27 > Exactly!  My system is the same way.
28 >
29 > Right now I've got a 4GB system that's using 708MB swap.  But vmstat
30 > isn't showing any swap activity.  Why?  Because some processes that I'm
31 > not aware about because I'm obviously not using, got swapped out a long
32 > time ago, and Linux is using that reclaimed RAM to compile chromium ;)
33 >
34 > If/when I need part of that 708MB becomes active, Linux will swap it
35 > back in in one short burst that I doubt that I'll even notice.
36
37 Then why not have a really big swap file? If swap is useful as a
38 second layer of caching behind RAM, why doesn't everyone with some
39 extra hard drive space have a 100GB swap file?
40
41 - Grant

Replies

Subject Author
Re: [gentoo-user] mysqld invoked oom-killer Albert Hopkins <marduk@×××××××××××.org>
Re: [gentoo-user] mysqld invoked oom-killer Paul Hartman <paul.hartman+gentoo@×××××.com>