[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Question regarding swap partition when installing Linux Mint Debian.

On Feb 1, 2014, at 12:42 PM, Lauge Andersen <laugeandersen@yahoo.dk> wrote:

> Hi. 
> I intend to install Linux Mint Debian and give up on the Ubuntu based distros. However when I go through the installer, I get to the point where I'm supposed to choose the size of the different partitions, but can anyone tell me how big should the swap partition be?
> I've read online that the size of the swap partition should be determined by the memory.
> I've therefore copypasted from my terminal below:
> free -m
>              total       used       free     shared    buffers     cached
> Mem:          7871       1546       6325          0         38        491
> -/+ buffers/cache:       1015       6855
> Swap:        12011          0      12011
> I'm currently using Lubuntu, it got an applicantion in the menu called "discs" and it shows that I currently got a swap partition on 8,5 GB. Will it therefore be correct just to choose to make the swap partition in Linux Mint Debian 8,5 GB as well? 
> Can I assume that the swap partition size the installer of an Ubuntu based distro automatically chose is the best size for a partition for Debian based distro as well? (I just chose the default installation when installing Lubuntu as well as other Ubuntu based distros, and therefore didn't have to chose the size of the partition manually)
> I guess this probably is a really stupid question, but since I'm fairly new to Linux, and some of the info I found online regarding this question was fairly confusing, I hope you can bear with me. And in case you notice quite some misspellings, I might as well add that English is not my native tongue :)
> Any way thanks a lot for the help in advance,
> Cheers.

There are lots of theories about how big to make your swap partition (or partitions -- you can have more than one)  Some people say two times the size of RAM but most don't give any reason why that particular multiplier.  There is logic for having at least as much swap as you have RAM (in other words, a multiplier of 1.0) because, when the system panics, it may want to make a copy of RAM to the swap space for later analysis.  This logic makes most sense if you're in a development shop where analyzing core dumps is a common practice; most folks aren't in that situation.

For modern machines, it's possible (and even common) to have enough RAM that you never need to swap at all, so a multiplier of zero is reasonable.

But there are uses for swap space that have nothing to do with swapping programs in and out of memory:  For example, if you decide to put /tmp in a ramdisk, you may want to allocate a swap partition that's much larger than your RAM as backup in case somebody needs *lots* of space in /tmp.  This will allow the system to use RAM for /tmp when the demand is light, and back-up to swap disk when demand is heavy.

So the definitive answer is, "It depends".  Your expected usage will determine how much swap space you need.

My personal rule of thumb is, "Start with twice your RAM and adjust from there depending on experience."

Does that help?


Reply to: