is a swap partition really necessary

mtb_mikey

Distinguished
Feb 22, 2001
21
0
18,510
When I setup my new PC I'm wondering if I should bother with a Linux swap partition, is it an absolute must?

When monitoring my old PC (512Mb ram) with "top"
it never seemed to use the swap partition. I think I read somewhere that a swap file on the normal (ext2) partition could be used. If this is the case would there be a performance penalty for a PC with 512Mb?

Basically I'm trying to save an entry in the partition table
on the disc.

What is the recommended size for swap file/partition for 2.4.x kernels. Some years ago I read something that said don't bother making the swap partition bigger than 128Mb because anything bigger won't get used.
 

poorboy

Distinguished
Jan 17, 2002
634
0
18,980
The short answer is no, a swap partition is not required.

I think most people with lots of RAM use on "just in case", but I have read somewhere that it's a Good Thing, and the kernel runs better with 2xRAM for Swap. That could just be a rumor though...

The 128MB limit has gone, and I've seen one of my boxes use more than that. FWIW, I've not seen my 512MB machine use any swap either, but my 256MB and 384MB boxes do.

I don't think you'll take a big performance hit on using a swap file (expecially if you don't use it). But why are you worried about using another partition?

<i>I used to have a girl, but then I got my CS degree...</i>
 

mtb_mikey

Distinguished
Feb 22, 2001
21
0
18,510
Mandrake 8.2 installer insisted that I made a swap partition :-(

I'm trying to avoid using up primary partition entries
(you only get 4 on an IDE disc).

Which leads to the next question, extended partitions.
When the Mandrake installer ran DiskDrake I couldn't find
an option to create an extended partition. So I've left
a big area at the end of the disc not allocated to anything.
I guess this means using command line fdisk.

I'd tried this in the past but Windows 98 didn't ignore them
in the same way it would ignore primary ext2 partitions. So I went back to just 4 primary partitions per hard drive, since I have 2 drives on my old PC this gave plenty of options. (I like to have a C and D drive for windows and I'd have two Linux distros installed).

I wonder if using GRUB to hide the extended partitions from win98 would work?
 

buddry

Distinguished
Mar 20, 2002
1,642
0
19,780
Swap partitions are good. Especially with how big harddrives are nowadays, you won't miss a few MB. You only need 2 partitions to install ( root and swap) but I usually have more depending on need.