Do you guys use SWAP space on new installs?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Pepi
Level 4
Level 4
Posts: 364
Joined: Wed Nov 18, 2009 7:47 pm

Do you guys use SWAP space on new installs?

Postby Pepi » Fri Nov 10, 2017 10:53 am

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 ???

User avatar
xenopeek
Level 24
Level 24
Posts: 21382
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

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

Postby xenopeek » Fri Nov 10, 2017 10:59 am

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

User avatar
Flemur
Level 13
Level 13
Posts: 4578
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

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

Postby Flemur » Fri Nov 10, 2017 10:59 am

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.
Mint 18.2 Xfce/fluxbox/pulse-less - Xubuntu 16.10/fluxbox/pulse-less
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?

User avatar
austin.texas
Level 20
Level 20
Posts: 11696
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

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

Postby austin.texas » Fri Nov 10, 2017 11:59 am

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.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2017

User avatar
Fred Barclay
Level 11
Level 11
Posts: 3963
Joined: Sat Sep 13, 2014 11:12 am
Location: Bumping around in the bush

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

Postby Fred Barclay » Fri Nov 10, 2017 1:02 pm

I've 8GB of RAM and never hibernate my computer, so I don't set up a swap partition (or install swapspace).
Image
"Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy."
- Albert Einstein

User avatar
JerryF
Level 7
Level 7
Posts: 1638
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

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

Postby JerryF » Fri Nov 10, 2017 2:24 pm

I do have swap because I hibernate sometimes.
Don't forget to edit your original post and add [SOLVED] to the beginning of the Subject line if your problem has been fixed.
My main language is English. I speak very little Portuguese, and a whole lot of gibberish.

User avatar
MintBean
Level 8
Level 8
Posts: 2479
Joined: Fri Aug 07, 2015 6:54 am
Location: Blighty

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

Postby MintBean » Fri Nov 10, 2017 2:29 pm

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.

Pepi
Level 4
Level 4
Posts: 364
Joined: Wed Nov 18, 2009 7:47 pm

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

Postby Pepi » Fri Nov 10, 2017 3:37 pm

Thanks guys ... Don't hibernate so it's not needed :D

User avatar
Lucap
Level 5
Level 5
Posts: 624
Joined: Tue May 24, 2016 1:40 am

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

Postby Lucap » Sat Nov 11, 2017 4:55 am

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?

User avatar
Pjotr
Level 18
Level 18
Posts: 8856
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

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

Postby Pjotr » Sat Nov 11, 2017 5:35 am

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.
Tip: 10 things to do after installing Linux Mint 18.2 Sonya
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

dark
Level 2
Level 2
Posts: 64
Joined: Wed Feb 22, 2017 3:02 pm

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

Postby dark » Sat Nov 11, 2017 5:46 am


User avatar
Lucap
Level 5
Level 5
Posts: 624
Joined: Tue May 24, 2016 1:40 am

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

Postby Lucap » Sat Nov 11, 2017 5:48 am

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

mr_raider
Level 6
Level 6
Posts: 1218
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

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

Postby mr_raider » Sat Nov 11, 2017 8:50 am

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

User avatar
Lucap
Level 5
Level 5
Posts: 624
Joined: Tue May 24, 2016 1:40 am

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

Postby Lucap » Sat Nov 11, 2017 7:40 pm

It happened sooner than i thought , Thanks

User avatar
jimallyn
Level 16
Level 16
Posts: 6735
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

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

Postby jimallyn » Sat Nov 11, 2017 8:47 pm

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

“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan

User avatar
majpooper
Level 4
Level 4
Posts: 376
Joined: Thu May 09, 2013 1:56 pm
Location: North Carolina, USA

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

Postby majpooper » Sat Nov 11, 2017 10:14 pm

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.

User avatar
Schultz
Level 5
Level 5
Posts: 883
Joined: Thu Feb 25, 2016 8:57 pm

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

Postby Schultz » Sat Nov 11, 2017 10:29 pm

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.

strypey
Level 1
Level 1
Posts: 8
Joined: Sun Oct 29, 2017 11:09 pm

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

Postby strypey » Fri Nov 17, 2017 3:00 am

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.

User avatar
Bolle1961
Level 5
Level 5
Posts: 590
Joined: Tue Jun 29, 2010 12:59 pm
Contact:

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

Postby Bolle1961 » Fri Nov 17, 2017 3:59 am

Yes, for hibernate
Laptop : Linux Mint 18.2 MATE x64 / Xubuntu 16.04.3 x64
Desktop : Linux Mint 18.2 MATE x64 / LMDE 2 MATE x64 / Ubuntu MATE 18.04 x64

LinuxCounter.net

Install recommended packages to avoid problems
Image

User avatar
Pierre
Level 15
Level 15
Posts: 5871
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

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

Postby Pierre » Fri Nov 17, 2017 9:43 am

yep - - always - but not for Hibernation.
:)
and just 1Gb in size . . .
- old habits, sure do die hard.
:(
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.


Return to “Newbie Questions”