Gentoo Archives: gentoo-user

From: Albert Hopkins <marduk@×××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] mysqld invoked oom-killer
Date: Fri, 22 Jul 2011 01:09:59
Message-Id: 1311296930.5379.23.camel@localhost.localdomain
In Reply to: Re: [gentoo-user] mysqld invoked oom-killer by Grant
1 On Thursday, July 21 at 16:53 (-0700), Grant said:
2
3
4 > So swap isn't treated exactly like RAM. It actually has special
5 > handling in Linux which makes it beneficial to have on almost any
6 > Linux system? According to Alan, things get very bad when a Linux
7 > system hits swap. How can behavior like this be beneficial:
8 >
9 > "When a linux machine hits swap, it does so very aggressively, there
10 > is nothing nice about it at all. The entire machine slows to a
11 > painstaking crawl for easily a minute at a time while the kernel
12 > writes pages out to disk, and disk is thousands of times slower than
13 > RAM.
14 >
15 This is not entirely true. There's regular swapping and there is
16 "thrashing". Thrashing is indicative of a memory-starved system, i.e.
17 when many processes are trying to access memory, but there just isn't
18 enough and the system is frantically swapping in/out. I'm talking about
19 your normal day-to-day swapping that you probably don't even notice.
20
21 > It gets so bad that you can't even run a shell properly to try and see
22 > what's going on and kill the actual memory hog."
23
24 Again, that is thrashing. I'm talking about "normal" swappage. Dont
25 throw the baby out with the bath water.
26
27 > Also, aren't you likely to wear out your hard disk sooner using swap?
28
29 Is this coming from someone who uses Gentoo linux, which is constantly
30 downloading/compiling/linking object files? Syslog and other loggers
31 writing everything under the sun to a log file. Backups, journal
32 writes, database transactions, etc. Compare how many disk transactions
33 take place during your normal Gentoo usage versus a few megabytes
34 here/there being swapped in/out. Again, I'm talking about regular
35 swapping, not "oh my god I has no RAM and my hard drive won't stop"
36 Even so, we're talking about modern drives here. This isn't the 1960s.

Replies

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