Are swap partitions not needed anymore?

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 this

Are swap partitions not needed anymore?

Postby simplex on Fri Dec 14, 2012 4:29 pm

I just gave LMDE a whole, freshly formatted 160GB hard drive to install on. I wonder that the installer has not created more than one partition. Not even a swap partition. Nevertheless, hibernating to hard drive works out-of-the-box!

How is this achieved? By creating swap files when needed? If so, where are they placed?

If so, what's the use of creating a swap partition nowadays? Other installers let you explicitly create swap partition.

Greetings,
S.
simplex
Level 2
Level 2
 
Posts: 91
Joined: Sat Oct 06, 2012 2:32 pm

Linux Mint is funded by ads and donations.
 

Re: Are swap partitions not needed anymore?

Postby widget on Sun Dec 16, 2012 1:29 am

Please post the output of;
Code: Select all
sudo fdisk -l

That is a lower case L at the end the easiest way to do this is simply copy/paste the command to your terminal.
Dell XPS 420 Core2 Quad Q 6600, audigy5.1, Radeon HD 6450 - currently 4 320Gb HDD, Debian Squeeze for secure use, Debian testing for daily use, Debian Sid for fun.
widget
Level 3
Level 3
 
Posts: 167
Joined: Thu May 14, 2009 2:49 am
Location: S.E. Montana

Re: Are swap partitions not needed anymore?

Postby caf4926 on Sun Dec 16, 2012 2:58 am

simplex wrote:the installer has not created more than one partition. Not even a swap partition.


Umm.....really

I'd like to see the fdisk too
Image
Mint 16 Cinnamon_64
User avatar
caf4926
Level 7
Level 7
 
Posts: 1778
Joined: Mon Mar 22, 2010 3:21 pm
Location: UK Lake District

Re: Are swap partitions not needed anymore?

Postby simplex on Sun Dec 16, 2012 2:40 pm

Seems that I have made some kind of mistake. I looked at the partitions created with gparted, and it showed me only 1 partition. Here is the output you have asked for:

Code: Select all
ziegler@MeinNC10-Debian ~ $ sudo fdisk -l
[sudo] password for ziegler:

Platte /dev/sda: 160.0 GByte, 160041885696 Byte
255 Köpfe, 63 Sektoren/Spur, 19457 Zylinder
Einheiten = Zylinder von 16065 × 512 = 8225280 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00073eba

   Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/sda1   *           1       19076   153219072   83  Linux
/dev/sda2           19076       19458     3068929    5  Erweiterte
/dev/sda5           19076       19458     3068928   82  Linux Swap / Solaris


So the installer created one extended partition with 1 swap partition inside ("erweitert" = "extended" in German, 3 times the size of my physical memory).

Sorry, that was my mistake. Nevertehless, hibernating did not work yesterday, I do not know why.

Greetings,
S.
simplex
Level 2
Level 2
 
Posts: 91
Joined: Sat Oct 06, 2012 2:32 pm

Re: Are swap partitions not needed anymore?

Postby caf4926 on Sun Dec 16, 2012 3:00 pm

I'm confused
In your first post you said hibernating worked
Now you are saying it doesn't

Is it a Box or a Laptop?


What about Sleep (Suspend)?
Image
Mint 16 Cinnamon_64
User avatar
caf4926
Level 7
Level 7
 
Posts: 1778
Joined: Mon Mar 22, 2010 3:21 pm
Location: UK Lake District

Re: Are swap partitions not needed anymore?

Postby simplex on Sun Dec 16, 2012 3:11 pm

caf4926 wrote:I'm confused
In your first post you said hibernating worked
Now you are saying it doesn't
Is it a Box or a Laptop?
What about Sleep (Suspend)?


Yes, i am confused, too. :-)

It's a subnotebook, Samsung NC-10. Hibernating worked in the first days. Yesterday, after a lot of hibernations, it did not work anymore. Now that I have rebooted the machine, it works again. I have no explanation for this. The subnotebook has 1 GB of physical memory.

Sleep always works... at least until now.

The mistake I did was looking at the partitions with "df" instead of with "fdisk". I overlooked the various "/dev/sda*". Blame it on me. Sorry for this posting. I am always willing to help...

I think that everything is ok, and all mistakes were mine.

But back to my initial question: Are swap partitions still needed? I heard or read that Ubuntu does create files on-the-fly when swap space is needed.

Greetings from Germany,
S.
simplex
Level 2
Level 2
 
Posts: 91
Joined: Sat Oct 06, 2012 2:32 pm

Re: Are swap partitions not needed anymore?

Postby widget on Sun Dec 16, 2012 4:47 pm

If you are hibernating you are going to need a /swap. Hard to create a file (a swap file) that will be hibernating and expect it to ever wake up.
Dell XPS 420 Core2 Quad Q 6600, audigy5.1, Radeon HD 6450 - currently 4 320Gb HDD, Debian Squeeze for secure use, Debian testing for daily use, Debian Sid for fun.
widget
Level 3
Level 3
 
Posts: 167
Joined: Thu May 14, 2009 2:49 am
Location: S.E. Montana

Re: Are swap partitions not needed anymore?

Postby caf4926 on Sun Dec 16, 2012 5:32 pm

I never use hibernate. Mine boots from cold as quickly as coming back from H
Only sleep
Image
Mint 16 Cinnamon_64
User avatar
caf4926
Level 7
Level 7
 
Posts: 1778
Joined: Mon Mar 22, 2010 3:21 pm
Location: UK Lake District

Re: Are swap partitions not needed anymore?

Postby widget on Sun Dec 16, 2012 9:05 pm

caf4926 wrote:I never use hibernate. Mine boots from cold as quickly as coming back from H
Only sleep

Don't you need swap for that too?

I wouldn't know, don't use either.

I run boinc and usually just let the bugger run all the time. If I am rebooting it is usually to go play with my other installs. Have to do that or start messing with the one I use all the time. That can lead to breakage. I mean excessive improvements.

Just broke an install today. Sid netboot install. Got it all set for a DE and told it;
Code: Select all
apt-get -t experimental install xfce4

and like a fool didn't read everything, hit Y and went to do something else. Removed the kernel. Will fix it and wait for the upgrade to 3.5. Already have linux-base 3.5 so it shouldn't be too long and experimental has xfce4.10 that I really want to see.

I don't want to brag too much but I am pretty good at breaking things.
Dell XPS 420 Core2 Quad Q 6600, audigy5.1, Radeon HD 6450 - currently 4 320Gb HDD, Debian Squeeze for secure use, Debian testing for daily use, Debian Sid for fun.
widget
Level 3
Level 3
 
Posts: 167
Joined: Thu May 14, 2009 2:49 am
Location: S.E. Montana

Re: Are swap partitions not needed anymore?

Postby caf4926 on Mon Dec 17, 2012 1:08 am

@OP you started asking if swap was needed. The answer is Yes (there are some times you might not). And you thought Mint installed without it, but we see it didn't.

Regarding the options for Hibernate and Suspend(Sleep):

I personally don't recommend using Hibernate for the following reasons. It has little if any advantage over a cold boot. If the user also has windows installed, it can prove very problematic if you have hibernated in one system, (forget) and when you resume, allow it to boot the other...

Suspend or Sleep does use some power though, so it's a matter of deciding how that fits your lifestyle/needs.

I can't tell the extent to which each uses swap.

But the swap use in my system (Laptop) increases over time, because I don't reboot very often, maybe once every week or 2. But this is normal, as the system will also be seemingly using most of your RAM (although in reality it's not)
Image
Mint 16 Cinnamon_64
User avatar
caf4926
Level 7
Level 7
 
Posts: 1778
Joined: Mon Mar 22, 2010 3:21 pm
Location: UK Lake District

Re: Are swap partitions not needed anymore?

Postby simplex on Mon Dec 17, 2012 12:44 pm

caf4926 wrote:I personally don't recommend using Hibernate for the following reasons. It has little if any advantage over a cold boot. If the user also has windows installed, it can prove very problematic if you have hibernated in one system, (forget) and when you resume, allow it to boot the other...

Suspend or Sleep does use some power though, so it's a matter of deciding how that fits your lifestyle/needs.


- I earn my money with IT (programming, giving courses...). It is very important for me that I start the next day exactly where I left the day before.
- My lifestyle includes the pragma that we should save as much energy as possible around the globe, so I do not want to sleep in winter, I want to hibernate. Latin "hibernare" = "to survive the winter" ;-) It's a deeper sleep, with pulse going down to zero beats per minute.

Thank you very much for all your comments. I am interested in improving your "product", just because it gives me something, and I want to give something back.

S.
simplex
Level 2
Level 2
 
Posts: 91
Joined: Sat Oct 06, 2012 2:32 pm

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: No registered users and 3 guests