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

The Don Lachlan ale-at-ale.org at unpopularminds.org
Tue May 31 16:05:47 EDT 2011


On 05/31/2011 03:37 PM, Pat Regan wrote:
> On Tue, 31 May 2011 15:18:13 -0400
> The Don Lachlan<ale-at-ale.org at unpopularminds.org>  wrote:
>> 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.
>
> The extended partition doesn't have to be at the end of the drive.  It

I can think of no reasons you would deliberately put a primary partition 
behind the extended partition.

> I disagree that the using the fastest part of the disk is a good idea
> for swap.  We shouldn't be using swap very often, if at all.  Giving it
> prime real estate on the disk seems like a waste to me :)

I think we're working on different systems. Swap costs pennies a GB, RAM 
costs many dollars per GB. We should be using swap because it's 
C-H-E-A-P-E-R.

Regular paging between physical RAM and swap space can be expensive to a 
system's performance; I would say that we shouldn't be paging in/out 
often, if at all, but paging out is A Good Thing <tm>.

I would also counter that I have never, EVER, seen anyone deliberately 
use the start of a disk for faster access unless they were using it for 
swap. If you want to put your most I/O intensive partition at the front 
of the disk, that absolutely makes sense - and as soon as I find someone 
who does that, I'll toggle my bit to 1. :)

>> 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.
>
> Also, if you want to be able to suspend to disk then make sure you have
> more swap than physical RAM as well.

D'oh! Yeah, I never suspend to disk so I hadn't considered that. Adjust 
all of my numbers + 1x RAM to include that.

-L


More information about the Ale mailing list