Re: disabling swap
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 Wikipedia.org, 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.
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.