swap size

General support questions
Post Reply
Typhome
Posts: 27
Joined: 2016/07/09 08:34:03

swap size

Post by Typhome » 2019/01/14 18:15:30

Hello

What's recommended swap size when server machine have 4GB or 16GB memory (without hibernation)?

There was recommendation formula in this link: https://docs.centos.org/5/html/Deployme ... space.html

Code: Select all

M = Amount of RAM in GB, and S = Amount of swap in GB, then

If M < 2
    S = M *2
Else
    S = M + 2
But this link does not exist, I guess it's outdated and should not follow this formula?

4GB memory => 6GB swap size
16GB memory => 18GB swap size


mghe
Posts: 766
Joined: 2015/11/24 12:04:43
Location: Katowice, Poland

Re: swap size

Post by mghe » 2019/01/14 18:44:04

If You will not have hibernate, formula has no use.

You can control of used it by swappiness.

Typhome
Posts: 27
Joined: 2016/07/09 08:34:03

Re: swap size

Post by Typhome » 2019/01/14 18:57:09

chemal, thanks for link.

4GB memory => 4GB swap
16GB memory => 4GB swap

mghe, server machine is running 24/7 without hibernation.

Post Reply