You are not logged in.

#1 2013-12-21 10:45:52

Oedner
Member
Registered: 2013-11-25
Posts: 7

[Solved] Do I need a swap partition /swap file?

Hello Arch Community.

I want to install Arch Linux on my Aspire V5-573G Notebook with 8GB RAM and a 120GB 840 Evo SSD from Samsung. So my question is, do I actually need a swap partition / swap file? I read the arch-wiki pages about swap and suspend-to-disk / suspend-to-ram, and the only thing thats obviously profiting from / needing a swap partition is suspend-to-disk, no other things are mentioned in this regard. Is a swap partition in any other way important?

Thanks in advance.

Last edited by Oedner (2013-12-21 12:41:19)

Offline

#2 2013-12-21 11:20:35

µ ²
Member
Registered: 2013-12-17
Posts: 10

Re: [Solved] Do I need a swap partition /swap file?

No.

Offline

#3 2013-12-21 11:36:38

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: [Solved] Do I need a swap partition /swap file?

Likely not with 8G of RAM.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2013-12-21 12:19:42

headkase
Member
Registered: 2011-12-06
Posts: 1,977

Re: [Solved] Do I need a swap partition /swap file?

Most programs won't come near using 8GB of RAM.  You should be fine, unless you run dozens of different programs at the same time, with no swap file.  Another question to ask is what will happen if you don't have a swap file and run out of memory?  In that case the Linux kernel will randomly kill process' until there is enough memory again.  Obviously that isn't very stable but that is what it will do.  The same thing will happen if you do have RAM + swap and run out of both of those too.

Offline

#5 2013-12-21 12:30:39

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: [Solved] Do I need a swap partition /swap file?

headkase wrote:

Another question to ask is what will happen if you don't have a swap file and run out of memory?  In that case the Linux kernel will randomly kill process' until there is enough memory again.  Obviously that isn't very stable but that is what it will do.

No. The OOM killer is pretty darn tweaked these days and usually(!) kills the actual perpetrator. The alternative—disabling memory overcommitting and answering memory requests with an out-of-memory error—can result in unforeseen problems as well: What if it  a system process is trying to allocate a few bytes for some random string, and what if said system process isn't equipped to handle ENOMEM gracefully and crashes, because the default policy on Linux is to overcommit and never answer with out-of-memory errors?

Just trying to play devil's advocate here. I'm not happy with the OOM killer either and I'd rather have a deterministic solution to out-of-memory situations, but I realize that it's probably not an easy problem to solve.

Offline

#6 2013-12-21 12:40:51

Oedner
Member
Registered: 2013-11-25
Posts: 7

Re: [Solved] Do I need a swap partition /swap file?

thanks for all of your input, I'm going without swap then since i only use the notebook for some office work, browsing and watching a movie now and then.

Offline

Board footer

Powered by FluxBB