Sunday, May 19, 2013

Recommend SWAP size for Linux

SWAP file usage in our Linux distribution is common to most all other Linux versions and so information gained from other systems running Linux should be usable in FreeBSD or Debian.

So to begin, SWAP disk space is used when we begin to run out of main RAM memory, using it just as if it were regular memory.
SWAP space prevents us from running out of memory, which can be a very bad problem should it occur.
SWAP space is also used with the computer function called Hibernate, where all of the computer memory state is saved to your hard disk and can be restored at a later date.

In this article though, we are concerned about its usage as memory.
So, the first thing to decide, is how much should you create, when you install the OS?

If you are like me, you often just go with the default of 2.00 GB or so.
But apparently, there are some basic recommendations for this SWAP file size to be created according to Red Hat recommendations.

RAM Memory SWAP File Size

16GB TO 64GB 8GB
64GB TO 256GB 16GB

Run command to check space:

free -m
total used free shared buffers cached
Mem: 1877 1690 187 0 8 177
-/+ buffers/cache: 1504 372
Swap: 1999 0 1999


  1. maillot de foot vintage...

    Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work....

  2. Lunettes de soleil Ray Ban...

    I simply want to say I’m newbie to blogging and definitely liked you’re blog. More than likely I’m going to bookmark your blog . You definitely have incredible writings. Appreciate it for revealing your website page....

  3. I'm new to blogspot and I'm having a difficult time. How can I change the background to a picture I want?.

  4. Depends what apps you are using.

  5. Thank you for every other informative site. Where else could I am
    getting that type of information written in such
    an ideal way? I've a project that I'm simply now working on, and
    I have been on the look out for such info.

  6. Excellent post however , I was wanting to know if you could write a
    litte more on this subject? I'd be very grateful if you could elaborate
    a little bit more. Appreciate it!