Answer the question
In order to leave comments, you need to log in
Do you need a swap?
Good evening, dear Habralyudi!
I'm going to install OpenSUSE myself. Already confused - some say a swap is needed, others that it is not needed.
I have 3 GB of RAM. I'm not going to use hibernation, but it is possible to use serious applications (for example, MatLab). Also, it is very likely that I will work with web servers, but for myself (just to learn).
Is a swap needed here? If yes, then to what extent?
PS It is possible that I just do not understand "how it works." In my mind, this is something like the Windows paging file.
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
With 3 gigs of RAM, I would definitely make a swap, at least 1-2 gigs.
Swap is always needed. Half of the memory, if there is no hibernate. This should be enough.
The swap is needed simply because the system will flush unusable pages to disk. And she doesn't do it at all when her memory runs out. Just imagine - your browser, photoshop and file manager are working. But since you don’t use them now, you still have (almost) 3 GB of RAM free. Disks are cheap nowadays, so allocating 1-2 GB for swap is nonsense (as one movie comes out in terms of volume).
I wouldn't put the question that way.
Not “needed or unnecessary”, but “with HDDs nowadays on TB or more, is it a pity to allocate a couple of three or even ten gigs?”
It couldn't get any worse, and having a reserve for emergencies even sounds reasonable.
You don't have to swap, but leave 6 GB of unallocated disk space.
If there is a lack of memory or the need to hibernate, then it will not be difficult to turn an unallocated area into a swap partition.
As a bonus, with those 6 GB you can always put another operating system to indulge.
On servers it is needed, on a home computer with 4+ gigabytes of memory it is not needed. For the last couple of years I have not seen a non-zero swap on my computers. On most servers, too, but I leave it there in case of “leaks” of memory, so that the system can at least fork the ssh session.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question