From: Rob Wultsch Date: April 18 2010 7:13pm Subject: Re: Recommended swap partition size List-Archive: http://lists.mysql.com/mysql/221282 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 On Sun, Apr 18, 2010 at 12:04 PM, Eric Bergen wrote: > Linux will normally swap out a few pages of rarely used memory so it's > a good idea to have some swap around. 2G seems excessive though. > Usually I prefer to have linux kill processes rather than excessively > swapping. I've worked on machines before that have swapped so badly > that it took minutes just to ssh to them. This is effectively a > failure scenario that can last for a lot longer than it takes to > restart/failover mysqld. For apache it means the clients will see > errors until the load balancer health check drops the server out of > rotation. The best solution in all cases is to keep an eye on swap > in/out and memory usage so neither the crash nor the excessive > swapping becomes a problem. > Umm, you were probably horribly over io utilized. Swapping by itself will not kill perforance I have some boxes where mysql has leaked a metric crap ton of memory and swapping is ok. The leaked memory is swapped out and sits out in swap. Every now and a again I create more swap to keep the server happy. Swapping is often preferable to crash with unplanned downtime. Note that innodb_flush_method can implact this... -- Rob Wultsch wultsch@stripped