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

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


On 05/31/2011 05:44 PM, Pat Regan wrote:
> On Tue, 31 May 2011 16:05:47 -0400
> The Don Lachlan<ale-at-ale.org at unpopularminds.org>  wrote:
>> I can think of no reasons you would deliberately put a primary
>> partition behind the extended partition.
> The most likely time for it to happen is if you run out of primary
> partitions and you want to split one of the earlier ones up into two
> (or more) partitions.  I'm sure someone has done that before :)

That's seems pretty non-deliberate, moreso "oh crap, how can I fix this?"

>> 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>.
> If a system is accessing swap often enough that the speed of the swap
> space makes a significant difference then it is most likely time for a
> memory upgrade.  That's all I'm trying to point out :)

And you're wrong. Let's break this into two problems: 1) system paging 
to swap space and 2) performance of swap space.

In the first, disk is between 3 and 4 orders of magnitude cheaper than 
RAM. Paging out a GB of data is extremely cost effective. A system does 
not need to page to swap but if you aren't, you've likely put too much 
(costly) RAM into a system that only needed (cheap) disk.

Regarding the second, the system cost of paging out data (which is good) 
is pretty minimal and I'm happy to make it a little more minimal by 
putting swap at the front of the disk. It may not gain you much but it 
costs you nothing. Not Much > Nothing.

A system which is paging in/out heavily has problems larger than its 
swap; however, that doesn't mean we ignore the swap. Who listens to the 
doctor that says, "Sorry, no cold medicine for you, just stop spending 
time around sick people." :)

>> 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. :)
>
> There's a good chance you've inadvertently done exactly this on your

Inadvertent != deliberate. You keep using that word. I do not think it 
means what you think it means.

> own systems.  Anyone creating smallish root/var partitions near the
> front of the drive are speeding up access to some of the most important
> files on the system.  :)

On occasions when I've discussed partitioning schema, persons 
recommended the small root/var/usr partitions for many reasons but never 
to increase disk access speed.

Drives list seek times because they matter; seek times are an average 
and clusters closest to the center are faster, clusters farther from the 
center are slower. Swap is something where your read/write speed can 
matter significantly but not so much you would expend money on RAID. Use 
the knowledge in front of you!

-L


More information about the Ale mailing list