Enter your email address:

Delivered by FeedBurner

How to manage the use of swap memory


StumbleUpon Toolbar

The use of the swap memory by default on Kernel 2.6.xx is set to 60% that means that the system will use intensively the swap memory, this is good if we have a small amount of memory and lot of load on our PC or server, but if we have plenty of RAM or we are using a Desktop machine, we maybe do not need this setting, let's see how to change it.

This is valid for Ubuntu, Debian, Fedora and CentOS

On a Terminal do this as root (use sudo if running Ubuntu)

cat /proc/sys/vm/swappiness

You should see 60, now change it to 10

sysctl -w vm.swappiness=10

Now is time to work for some minutes with some applications if you see that is better, you can make the changes permanent.

vim /etc/sysctl.conf

and add this line at the end (if it does not exist, otherwise edit it)

vm.swappiness=10

Trackback URL for this post:

http://www.go2linux.org/trackback/40
StumbleUpon Toolbar

 If you like this article, subscribe to our full rss

If this article was somehow useful for you, you can leave something in the tip's jar

Please post your question in our forum and use comments only to leave your comments about the article, thanks.

If I set the swappiness too

If I set the swappiness too high, will background applications stop working? IE. If I put swappiness to 0, can I leave bittorrent running while I search the web?

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Captcha
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

This site is proudly hosted at Bluefur Hosting