Do you guys use SWAP space on new installs?

Archived topics about LMDE 1 and LMDE 2
Locked
User avatar
Pepi
Level 6
Level 6
Posts: 1308
Joined: Wed Nov 18, 2009 7:47 pm

Do you guys use SWAP space on new installs?

Post 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 ???
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29507
Joined: Wed Jul 06, 2011 3:58 am

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

Post 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.
Image
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

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

Post 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.
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: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

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

Post 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.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
User avatar
Fred Barclay
Level 12
Level 12
Posts: 4185
Joined: Sat Sep 13, 2014 11:12 am
Location: USA primarily

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

Post 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).
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 16
Level 16
Posts: 6553
Joined: Mon Jun 08, 2015 1:23 pm
Location: Rhode Island, USA

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

Post by JerryF »

I do have swap because I hibernate sometimes.
MintBean

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

Post 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.
User avatar
Pepi
Level 6
Level 6
Posts: 1308
Joined: Wed Nov 18, 2009 7:47 pm

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

Post by Pepi »

Thanks guys ... Don't hibernate so it's not needed :D
Lucap
Level 6
Level 6
Posts: 1038
Joined: Tue May 24, 2016 1:40 am

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

Post 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?
User avatar
Pjotr
Level 23
Level 23
Posts: 19878
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

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

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

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

Post by dark »

Lucap
Level 6
Level 6
Posts: 1038
Joined: Tue May 24, 2016 1:40 am

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

Post 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 :)
mr_raider
Level 7
Level 7
Posts: 1897
Joined: Sun Jun 20, 2010 9:50 am
Location: Montreal, QC

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

Post 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.
Image
Lucap
Level 6
Level 6
Posts: 1038
Joined: Tue May 24, 2016 1:40 am

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

Post by Lucap »

It happened sooner than i thought , Thanks
User avatar
jimallyn
Level 19
Level 19
Posts: 9075
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

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

Post 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.
“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 8
Level 8
Posts: 2084
Joined: Thu May 09, 2013 1:56 pm
Location: North Carolina, USA

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

Post 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.
User avatar
Schultz
Level 9
Level 9
Posts: 2935
Joined: Thu Feb 25, 2016 8:57 pm

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

Post 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.
strypey

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

Post 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.
User avatar
Bolle1961
Level 5
Level 5
Posts: 889
Joined: Tue Jun 29, 2010 12:59 pm

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

Post by Bolle1961 »

Yes, for hibernate
User avatar
Pierre
Level 21
Level 21
Posts: 13192
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

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

Post by Pierre »

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!.
Locked

Return to “LMDE Archive”