MySQL Forums
Forum List  »  Performance

Re: disabling swap
Posted by: Peter Zaitsev
Date: December 15, 2004 01:46PM

I would just benchmark it instead of asking :)

In case the box is dedicated MySQL server I normally recommend turning off swap as what are you going to swap anyway ? There would be 20-30Mb of
stuff which is not needed but there wil be a lot of resources spent looking for something else to swap out or swapping the wrong stuff.

In some cases however OS (ie some linux kernel) is buggy and they will go wild if swap is disabled.

MyISAM is usually less impacted by enabled swap as it keeps large OS cache which makes OS happy thinking it has enough potentially free memory.
With Innodb when you typically have 60%+ of memory consumed by MySQL process with large IO pressure OS may get nervous about situation and swap out wrong stuff.

A lot of MySQL configuration options also matter.

Personal experience - With RedHat Enterprise Server 3 and RedHat 9 I had up to 3 times better performance with Swap disabled in some tests. With SuSE 9 the difference is usually different.

Options: ReplyQuote

Written By
December 11, 2004 02:58AM
December 11, 2004 04:48AM
December 11, 2004 01:08PM
December 11, 2004 02:56PM
December 11, 2004 08:48PM
Re: disabling swap
December 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.