Page 1 of 1

Do you guys use SWAP space on new installs?

Posted: Fri Nov 10, 2017 10:53 am
by Pepi
Lately on installs I don't even use a SWAP space partition. I really don't see any difference without it. Most of the machine I setup with LINUX has at least 6 gig of RAM. Am I on the wrong path ???

Re: Do you guys use SWAP space on new installs?

Posted: Fri Nov 10, 2017 10:59 am
by xenopeek
swap is need if you want to be able to hibernate your computer (suspend to disk). In general recommendation is to set swap to about 20% of the size of your RAM. But yes you can do without swap.

Re: Do you guys use SWAP space on new installs?

Posted: Fri Nov 10, 2017 10:59 am
by Flemur
I have 4G memory and almost never use the swap, which is set pretty small; it's there mostly so the system will slow up (when swap is used, which it almost never is) rather than choke from out of memory.

Re: Do you guys use SWAP space on new installs?

Posted: Fri Nov 10, 2017 11:59 am
by austin.texas
With 8 GB of RAM, I did not have any problem operating with no swap partition.
I install the swapspace program just in case...

Code: Select all

sudo apt-get install swapspace

Code: Select all

~ $ apt show swapspace
Package: swapspace
Version: 1.10-4ubuntu3
Priority: optional
Section: universe/admin
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Eugene V. Lyubimkin <jackyf.devel@gmail.com>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 122 kB
Depends: libc6 (>= 2.7), lsb-base (>= 3.2-14)
Conflicts: swapd
Homepage: http://pqxx.org/development/swapspace
Download-Size: 28.7 kB
APT-Manual-Installed: yes
APT-Sources: http://mirrors.usinternet.com/ubuntu/archive xenial/universe amd64 Packages
Description: dynamic swap space manager
 Small, stable system add-on that continuously and automatically adapts
 available virtual memory space to your actual memory needs.  Claims disk space
 for use as swap space when needed; frees it up for use by the filesystem when
 not needed.

Re: Do you guys use SWAP space on new installs?

Posted: Fri Nov 10, 2017 1:02 pm
by Fred Barclay
I've 8GB of RAM and never hibernate my computer, so I don't set up a swap partition (or install swapspace).

Re: Do you guys use SWAP space on new installs?

Posted: Fri Nov 10, 2017 2:24 pm
by JerryF
I do have swap because I hibernate sometimes.

Re: Do you guys use SWAP space on new installs?

Posted: Fri Nov 10, 2017 2:29 pm
by MintBean
Flemur wrote:I have 4G memory and almost never use the swap, which is set pretty small; it's there mostly so the system will slow up (when swap is used, which it almost never is) rather than choke from out of memory.
This!
Even if you don't hibernate, for me it's worth a few gig of disc space just not to have the machine crash that 'once in a blue moon' you load it to the gills.

Re: Do you guys use SWAP space on new installs?

Posted: Fri Nov 10, 2017 3:37 pm
by Pepi
Thanks guys ... Don't hibernate so it's not needed :D

Re: Do you guys use SWAP space on new installs?

Posted: Sat Nov 11, 2017 4:55 am
by Lucap
I remember reading awhile back that either Ubuntu or Debian was going to start using on the fly temporary swap files like windows pagefile/swapfile.sys , did that ever happen?

Re: Do you guys use SWAP space on new installs?

Posted: Sat Nov 11, 2017 5:35 am
by Pjotr
Lucap wrote:I remember reading awhile back that either Ubuntu or Debian was going to start using on the fly temporary swap files like windows pagefile/swapfile.sys , did that ever happen?
By default, Ubuntu is using a swap file now on the root partition. No more separate swap partition.... Not my favourite design decision. Better keep the junk off the root partition, I'd say.

Re: Do you guys use SWAP space on new installs?

Posted: Sat Nov 11, 2017 5:46 am
by dark

Re: Do you guys use SWAP space on new installs?

Posted: Sat Nov 11, 2017 5:48 am
by Lucap
I've just recently been playing with 17.10 on a old computer with a Raptor drive and it was often making racket.

I didn't have a swap partition setup so that would explain a lot if it was swapping to a root file.

*edit*
dark wrote:You can use the swap file instead.
https://thelinuxexperiment.com/using-a- ... -in-linux/
I would want to remove it ,not enable it , thanks :)

Re: Do you guys use SWAP space on new installs?

Posted: Sat Nov 11, 2017 8:50 am
by mr_raider
Lucap wrote:I've just recently been playing with 17.10 on a old computer with a Raptor drive and it was often making racket.

I didn't have a swap partition setup so that would explain a lot if it was swapping to a root file.

*edit*
dark wrote:You can use the swap file instead.
https://thelinuxexperiment.com/using-a- ... -in-linux/
I would want to remove it ,not enable it , thanks :)
Since Ubuntu 17.04, the installer creates a swap file instead of a swap partition by default.

Re: Do you guys use SWAP space on new installs?

Posted: Sat Nov 11, 2017 7:40 pm
by Lucap
It happened sooner than i thought , Thanks

Re: Do you guys use SWAP space on new installs?

Posted: Sat Nov 11, 2017 8:47 pm
by jimallyn
I always use a swap partition. I have 12 GB or RAM, but I often have many, many tabs open in my browser (which sucks RAM big time), edit large audio files, and sometimes have one or more other operating systems running in VirtualBox. When I only had 4 GB of RAM, the swap was used a lot, but not so much now that I have 12 GB or RAM.

Re: Do you guys use SWAP space on new installs?

Posted: Sat Nov 11, 2017 10:14 pm
by majpooper
Fred Barclay wrote:I've 8GB of RAM and never hibernate my computer, so I don't set up a swap partition (or install swapspace).
ditto here as well with 16GB RAM for well over a year now.

Re: Do you guys use SWAP space on new installs?

Posted: Sat Nov 11, 2017 10:29 pm
by Schultz
I "only" have 4 gigs of RAM and I don't use any swap space. But then again, I really don't do anything that uses much RAM.

Re: Do you guys use SWAP space on new installs?

Posted: Fri Nov 17, 2017 3:00 am
by strypey
Ultimately it depends what hardware you are using, and what you want to do with it. For example, I have an old netbook that came with only 1GB of RAM. I recently replace the old hard drive with a new SSD drive and upgraded the RAM to 2GB. Now, because this PC has so little RAM, there may well be times when my OS (Trisquel 7 on that PC) dumps stuff from RAM to the swap partition, and because internal SSDs are super-fast, this stuff will be pretty quickly recoverable. So for me, sacrificing 2GB of my drive for a /swap partition feels worth it. In fact, since the new drive is twice the size of the old one, and I have plenty of external storage, I might even experiment with having a 4GB swap and see if that improves or degrades performance.

BTW If you like to hibernate your box, the standard recommendation is to have a swap that it as least the size of your physical RAM, so the entire contents of RAM can be dumped to the swap when you hibernate.

All that said, the /swap partition is an artifact from the early days of UNIX servers, like /boot and other special partitions that desktop installs mostly do without. It sounds like having a swapspace available within the root partition is probably a more efficient use of space, and I might experiment with that on my newer boxen. I do recommend keeping your root and /home partitions separate though, so you can easily reinstall your OS without affecting the user files in /home. A root partition of 15-20GB is plenty unless you install lots of big applications. I used to use 5-10GB, but I found that wasn't quite enough for Mint 17, so I made the partition larger when I installed LMDE.

Re: Do you guys use SWAP space on new installs?

Posted: Fri Nov 17, 2017 3:59 am
by Bolle1961
Yes, for hibernate

Re: Do you guys use SWAP space on new installs?

Posted: Fri Nov 17, 2017 9:43 am
by Pierre
yep - - always - but not for Hibernation.
:)
and just 1Gb in size . . .
- old habits, sure do die hard.
:(