Problems with repartitioning a HP Pavilion Laptop

Liam Proven lproven at
Fri Aug 17 23:55:30 UTC 2012

On 18 August 2012 00:28, Felix Miata <mrmazda at> wrote:
> On 2012/08/17 23:04 (GMT+0100) Liam Proven composed:
>> [2c] An sda7 "swap" partition right on the end of 2xRAM in size. The
>> type is "Linux swap".
> I've never did a comprehensive HD I/O test where the end wasn't far and away
> the slowest bunch of sectors on the device. I always put swap near the
> front, typically ahead of the first / and not on a primary.

This is true, but not important. Let me explain... :¬)

I started advising this tactic in about 1995, when the standard size
hard disk for a PC was 1.2GB. That's before FAT32 was invented and a
single 1.2GB partition leads to /horrendously/ inefficient 32KB
clusters on FAT16.

So what I recommended was this: partition the drive into a
just-under-1GB C: drive, for Windows, and a 200MB D: drive dedicated
to the swapfile. This means you can actually get more on the C: drive
with 8K clusters than you can with 16K clusters /and/ you get a "free"
200MB drive for the paging file. The 200MB would be wasted in slack
space anyway with a single partition, and what's more, having the
paging file on a dedicated empty drive reduces fragmentation on the
system drive. It's win/win.

One PC manufacturer came into the testing labs I ran for a major UK PC
magazine in those days and complained about this. He pointed out how
the end tracks are the slowest and that putting something
performance-critical there would reduce system performance.

So, to humour him, I set up the same PC with 3 different partitioning schemas.

[1] Monolithic C: drive
[2] 0.99GB C:, 200MB D:
[3] 200MB C: with just DOS & the pagefile, 0.99GB C: with \Windows and
all the other parts of the OS.

#3 is what he wanted to use the fastest part of the disk for the paging.

I benchmarked each config right there for him, multiple runs until a
stable average value was achieved.

There was *no difference whatsoever*.

This is in 1995, with an EIDE hard disk, Windows 95A and not a lot of
RAM - 16MB or 32MB, I forget now. Our benchmark suite comprised Word,
Excel, Photoshop & various other big, memory-intensive apps - Win95
swapped pretty hard on such a config.

I also tried it with Windows NT 3.51 for completeness. Same result.

Yes, the difference is there. It is tiny, though. In actual practice,
back in the days when swapping was heavy, it made no measurable
difference down to the *second decimal place of a percentage.*

Now, on a modern PC with lots of RAM that barely touches swap at all,
and superfast bus-mastering DMA hard disks, there really is no point
at all in worrying about it.

Now I confess I have not benchmarked it on modern kit, but I stand by
my tests of 17Y ago. The difference is too small to measure. So don't
worry about it and stick swap right at the end of the disk where it's
out of the way.

In fact if you're really worried, think about this: it keeps your OS
files right there on the fast early part of the disk. The effect of
/this/ apparently offsets any slowdown through slow swapping - but
really, I don't think it's measurable.

Liam Proven • Profile:
Email: lproven at • GMail/G+/Twitter/Flickr/Facebook: lproven
MSN: lproven at • Skype/AIM/Yahoo/LinkedIn: liamproven
Tel: +44 20-8685-0498 • Cell: +44 7939-087884

More information about the ubuntu-users mailing list