MySQL Forums :: Performance :: disabling swap

Advanced Search

Re: disabling swap
Posted by: James Day ()
Date: December 11, 2004 08:48PM

It strongly depends on the system configuration and OS version. In a linux environment you should use top and vmstat to monitor swap use. For top, turn on the optional column for displaying the number of hard page faults (called nFLT in some versions). If it's a dedicated server I aim for close to zero si and so in vmstat monitoring, based on experience showing that any significant amount hurts.

After testing I now have all database servers except the master configured with swap completely disabled. Not the master only because I want the protection from myself or exceptional surges like denial of service attacks. My thinking there is also gradually tending in the direction of turning off swap...

I came to this conclusion after trying the adjustments to swapability settings in Fedora Core 2. I found them to be useless for this purpose. The issue is basically that the OS grabs more and more RAM from the database for OS cache, presumably because of the observed high disk load. If you aren't affected by that, and have low si/so/nFLT activity, this may not matter for you. Results based on the environment at, which largely uses InnoDB. Results may differ for MyISAM cases where you need the row data, because the OS cache is used for the rows in MyISAM but not InnoDB. In the MyISAM case, it's possible that the OS is actually right, but in that case, you should perhaps be looking to reduce MyISAM key_buffers or otherwise adjust the server tuning to avoid swapping.

Options: ReplyQuote

Subject Views Written By Posted
disabling swap 2834 Haafiz Dossa 12/11/2004 02:58AM
Re: disabling swap 2269 STARYNKEVITCH Basile 12/11/2004 04:48AM
Re: disabling swap 2207 Haafiz Dossa 12/11/2004 01:08PM
Re: disabling swap 2165 STARYNKEVITCH Basile 12/11/2004 02:56PM
Re: disabling swap 5211 James Day 12/11/2004 08:48PM
Re: disabling swap 2282 Peter Zaitsev 12/15/2004 01:46PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.