[ale] On swap space (was Re: who is eating my drive)

The Don Lachlan ale-at-ale.org at unpopularminds.org
Tue May 31 15:18:13 EDT 2011


On 05/31/2011 02:28 PM, Lightner, Jeff wrote:
> I have never heard anything that says swap can’t be on a primary disk
> partition and am pretty sure I’ve done that in the past. However, these

In a physical system, swap should be a primary partition, specifically 
the FIRST partition. Why? Because the first partition is closest and has 
fastest access. I forget which distro I marked in the Do Not Use column 
because it wouldn't allow me to partition that way - it would quietly 
move the swap partition after the boot partition.

> *From:*ale-bounces at ale.org [mailto:ale-bounces at ale.org] *On Behalf Of
> *Narahari 'n' Savitha
>
> I have 8GB of Memory allocated to this VMWare session.
> I may not need almost any swap at all.

The classic rule is swap space should be 2x your physical RAM; this was 
so that in a crash, the system could dump it's memory to swap and still 
have 1x RAM to boot. Linux does not require swap space to run, so the 
latter is not an issue and I doubt you're going to be recovering crash 
dumps, so the first is also not an issue.

Use as much swap as you think you may need; if you have the spare disk 
(disk is cheap), then I would use 1x RAM for swap. More than that should 
be unnecessary. As for minimum - 1GB of swap is usually sufficient.

> On Tue, May 31, 2011 at 1:40 PM, Lightner, Jeff <JLightner at water.com
> <mailto:JLightner at water.com>> wrote:
>
> SWAP device (/dev/sda5). (By the way you don’t typically use Extended
> partition until you run out of primaries – you could have made /dev/sda2
> itself the swap device.

I've seen an installer that defaulted to only two primary partitions, 
where the second holds the extended partitions. I'm not aware of a 
technical issue with this, though I find it ugly and don't use it.

-L


More information about the Ale mailing list