<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: MySQL and the Linux swap problem</title>
	<atom:link href="http://blogs.smugmug.com/don/2008/05/01/mysql-and-the-linux-swap-problem/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.smugmug.com/don/2008/05/01/mysql-and-the-linux-swap-problem/</link>
	<description>Thought stream from SmugMug's CEO &#38; Chief Geek</description>
	<pubDate>Thu, 03 Jul 2008 23:04:38 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6-bleeding2</generator>
		<item>
		<title>By: Linux Memory Usage at btm.geek</title>
		<link>http://blogs.smugmug.com/don/2008/05/01/mysql-and-the-linux-swap-problem/#comment-102898</link>
		<dc:creator>Linux Memory Usage at btm.geek</dc:creator>
		<pubDate>Thu, 08 May 2008 21:54:24 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.smugmug.com/don/?p=217#comment-102898</guid>
		<description>[...] smugmug discussion about swappiness is interesting, as that was originally my problem because running out [...]</description>
		<content:encoded><![CDATA[<p>[...] smugmug discussion about swappiness is interesting, as that was originally my problem because running out [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Burton</title>
		<link>http://blogs.smugmug.com/don/2008/05/01/mysql-and-the-linux-swap-problem/#comment-102868</link>
		<dc:creator>Kevin Burton</dc:creator>
		<pubDate>Mon, 05 May 2008 22:20:52 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.smugmug.com/don/?p=217#comment-102868</guid>
		<description>Thanks Bernd......

I started a thread on LKML about this so hopefully this patch will fix this problem.

Now I need to find some time to apply the patch to our kernel.

Kevin</description>
		<content:encoded><![CDATA[<p>Thanks Bernd&#8230;&#8230;</p>
<p>I started a thread on LKML about this so hopefully this patch will fix this problem.</p>
<p>Now I need to find some time to apply the patch to our kernel.</p>
<p>Kevin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Don MacAskill</title>
		<link>http://blogs.smugmug.com/don/2008/05/01/mysql-and-the-linux-swap-problem/#comment-102866</link>
		<dc:creator>Don MacAskill</dc:creator>
		<pubDate>Mon, 05 May 2008 21:39:51 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.smugmug.com/don/?p=217#comment-102866</guid>
		<description>@Bernd Eckenfels

Thanks for the info!  (Reads just joining, here's a link to Rik's post in that thread:  http://www.ussg.iu.edu/hypermail/linux/kernel/0805.0/2261.html )</description>
		<content:encoded><![CDATA[<p>@Bernd Eckenfels</p>
<p>Thanks for the info!  (Reads just joining, here&#8217;s a link to Rik&#8217;s post in that thread:  <a href="http://www.ussg.iu.edu/hypermail/linux/kernel/0805.0/2261.html" rel="nofollow">http://www.ussg.iu.edu/hypermail/linux/kernel/0805.0/2261.html</a> )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bernd Eckenfels</title>
		<link>http://blogs.smugmug.com/don/2008/05/01/mysql-and-the-linux-swap-problem/#comment-102865</link>
		<dc:creator>Bernd Eckenfels</dc:creator>
		<pubDate>Mon, 05 May 2008 21:28:12 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.smugmug.com/don/?p=217#comment-102865</guid>
		<description>Rik van Riel recently commented on that on lkml: 20080505164446.2ec9a543@cuia.bos.redhat.com

One of the problems is that the process pages (anonymous memory) and
page cache pages live on the same LRU, so the kernel cannot always
easily find the page cache pages when it is trying to evict something.

Once that is fixed, and replacement is biased towards evicting page
cache pages, the system may do the right thing by itself.

I realize that this is no quick fix for your issue, but I am working
on a split LRU patch series to make sure Linux does the right thing in
the future.

You can find the latest patch at http://people.redhat.com/riel/splitvm/
and info on the design at http://linux-mm.org/PageReplacementDesign</description>
		<content:encoded><![CDATA[<p>Rik van Riel recently commented on that on lkml: <a href="mailto:20080505164446.2ec9a543@cuia.bos.redhat.com">20080505164446.2ec9a543@cuia.bos.redhat.com</a></p>
<p>One of the problems is that the process pages (anonymous memory) and<br />
page cache pages live on the same LRU, so the kernel cannot always<br />
easily find the page cache pages when it is trying to evict something.</p>
<p>Once that is fixed, and replacement is biased towards evicting page<br />
cache pages, the system may do the right thing by itself.</p>
<p>I realize that this is no quick fix for your issue, but I am working<br />
on a split LRU patch series to make sure Linux does the right thing in<br />
the future.</p>
<p>You can find the latest patch at <a href="http://people.redhat.com/riel/splitvm/" rel="nofollow">http://people.redhat.com/riel/splitvm/</a><br />
and info on the design at <a href="http://linux-mm.org/PageReplacementDesign" rel="nofollow">http://linux-mm.org/PageReplacementDesign</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Burton</title>
		<link>http://blogs.smugmug.com/don/2008/05/01/mysql-and-the-linux-swap-problem/#comment-102856</link>
		<dc:creator>Kevin Burton</dc:creator>
		<pubDate>Mon, 05 May 2008 03:40:13 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.smugmug.com/don/?p=217#comment-102856</guid>
		<description>Just FYI... I'm getting the same behavior on 2.6.24 on Debian Etch.  

I loaded MySQL and a robot process which took up 3.8G out of 4G... a good bit of it left over.

I then decided to go for a hike in the Marin Headlands for a few hours.

I come back and Linux has decided to swap out 2G of MySQL.

Brilliant.  Kill me now please.

At least my hike was good.

Hm.... I wonder if I could LD_PRELOAD the kernel to disable using the page cache........

Kevin</description>
		<content:encoded><![CDATA[<p>Just FYI&#8230; I&#8217;m getting the same behavior on 2.6.24 on Debian Etch.  </p>
<p>I loaded MySQL and a robot process which took up 3.8G out of 4G&#8230; a good bit of it left over.</p>
<p>I then decided to go for a hike in the Marin Headlands for a few hours.</p>
<p>I come back and Linux has decided to swap out 2G of MySQL.</p>
<p>Brilliant.  Kill me now please.</p>
<p>At least my hike was good.</p>
<p>Hm&#8230;. I wonder if I could LD_PRELOAD the kernel to disable using the page cache&#8230;&#8230;..</p>
<p>Kevin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A Linux Fan now gone</title>
		<link>http://blogs.smugmug.com/don/2008/05/01/mysql-and-the-linux-swap-problem/#comment-102854</link>
		<dc:creator>A Linux Fan now gone</dc:creator>
		<pubDate>Mon, 05 May 2008 00:15:09 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.smugmug.com/don/?p=217#comment-102854</guid>
		<description>Why not forget all of Linux's kernel insanity and just run on OpenSolaris.</description>
		<content:encoded><![CDATA[<p>Why not forget all of Linux&#8217;s kernel insanity and just run on OpenSolaris.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: just a bar</title>
		<link>http://blogs.smugmug.com/don/2008/05/01/mysql-and-the-linux-swap-problem/#comment-102850</link>
		<dc:creator>just a bar</dc:creator>
		<pubDate>Sun, 04 May 2008 11:08:20 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.smugmug.com/don/?p=217#comment-102850</guid>
		<description>That's a known problem with swappiness=0. Set it to 10 and kswapd won't hog the CPU anymore.</description>
		<content:encoded><![CDATA[<p>That&#8217;s a known problem with swappiness=0. Set it to 10 and kswapd won&#8217;t hog the CPU anymore.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Finite</title>
		<link>http://blogs.smugmug.com/don/2008/05/01/mysql-and-the-linux-swap-problem/#comment-102847</link>
		<dc:creator>Finite</dc:creator>
		<pubDate>Sun, 04 May 2008 06:33:06 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.smugmug.com/don/?p=217#comment-102847</guid>
		<description>This is some kind of joke, right?

As if swapping to a ramdisk wasn't retarded enough, you've decided to throw a filesystem in the middle? Hilarious stuff!

So, what happens when the kernel decides to swap out some of that memory used by the ramdisk?</description>
		<content:encoded><![CDATA[<p>This is some kind of joke, right?</p>
<p>As if swapping to a ramdisk wasn&#8217;t retarded enough, you&#8217;ve decided to throw a filesystem in the middle? Hilarious stuff!</p>
<p>So, what happens when the kernel decides to swap out some of that memory used by the ramdisk?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Olaf van der Spek</title>
		<link>http://blogs.smugmug.com/don/2008/05/01/mysql-and-the-linux-swap-problem/#comment-102840</link>
		<dc:creator>Olaf van der Spek</dc:creator>
		<pubDate>Sat, 03 May 2008 18:36:07 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.smugmug.com/don/?p=217#comment-102840</guid>
		<description>&#62; You can’t just not have any swap partitions, though, or kswapd will literally dominate one of your CPU cores doing who-knows-what.

I assume this bug has been reported, but I don't see a link. Got one? ;)

&#62; Zeek, some people do run without swap but there shouldn’t be a need to disable it or run without swap.

There shouldn't be a need to enable swap in the first place.

&#62; The problem is the OOM killer.

&#62; If you’re on a 16GB box… and you have 16GB of memory in InnoDB… an errant ls or top shouldn’t be able to trigger the OOM killer and thus kill -9 your mysqld.

I think what is needed is something like memory quotas. You could allocate/reserve 15 gb for MySQL. The OoM killer can then make a better decision about what to kill when more memory is needed.</description>
		<content:encoded><![CDATA[<p>&gt; You can’t just not have any swap partitions, though, or kswapd will literally dominate one of your CPU cores doing who-knows-what.</p>
<p>I assume this bug has been reported, but I don&#8217;t see a link. Got one? <img src='http://blogs.smugmug.com/don/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>&gt; Zeek, some people do run without swap but there shouldn’t be a need to disable it or run without swap.</p>
<p>There shouldn&#8217;t be a need to enable swap in the first place.</p>
<p>&gt; The problem is the OOM killer.</p>
<p>&gt; If you’re on a 16GB box… and you have 16GB of memory in InnoDB… an errant ls or top shouldn’t be able to trigger the OOM killer and thus kill -9 your mysqld.</p>
<p>I think what is needed is something like memory quotas. You could allocate/reserve 15 gb for MySQL. The OoM killer can then make a better decision about what to kill when more memory is needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Burton</title>
		<link>http://blogs.smugmug.com/don/2008/05/01/mysql-and-the-linux-swap-problem/#comment-102825</link>
		<dc:creator>Kevin Burton</dc:creator>
		<pubDate>Sat, 03 May 2008 06:54:10 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.smugmug.com/don/?p=217#comment-102825</guid>
		<description>Zeek, some people do run without swap but there shouldn't be a need to disable it or run without swap.

The problem is the OOM killer.

If you're on a 16GB box... and you have 16GB of memory in InnoDB... an errant ls or top shouldn't be able to trigger the OOM killer and thus kill -9 your mysqld.

Things like overcommit make it worse...</description>
		<content:encoded><![CDATA[<p>Zeek, some people do run without swap but there shouldn&#8217;t be a need to disable it or run without swap.</p>
<p>The problem is the OOM killer.</p>
<p>If you&#8217;re on a 16GB box&#8230; and you have 16GB of memory in InnoDB&#8230; an errant ls or top shouldn&#8217;t be able to trigger the OOM killer and thus kill -9 your mysqld.</p>
<p>Things like overcommit make it worse&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
