I
I
Igor Petrov2011-06-22 01:01:45
linux
Igor Petrov, 2011-06-22 01:01:45

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

7 answer(s)
S
shadowalone, 2011-06-22
@KriegeR

With 3 gigs of RAM, I would definitely make a swap, at least 1-2 gigs.

P
phasma, 2011-06-22
@phasma

Swap is always needed. Half of the memory, if there is no hibernate. This should be enough.

A
afiskon, 2011-06-22
@afiskon

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).

V
Vladson, 2011-06-22
@Vladson

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.

V
vinxru, 2011-06-22
@vinxru

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.

S
Sergey, 2011-06-22
@bondbig

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.

C
charon, 2011-06-22
@charon

I would put a swap equal to the OP. When the system crashes, the OP is dumped into a swap, and if your swap has less RAM, then garbage comes out.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question