cancel
Showing results for 
Search instead for 
Did you mean: 

HD Partitioning

 
SOLVED
Go to solution
Respected Contributor

HD Partitioning

When you create a new (first) partition where does it end up on the hard drive?
I want to make sure that my O.S. and swap end up on the outside (fast part) of the hard drive. Are partitions created from the outside to inside on the other way around?
11 REPLIES 11
Honored Contributor
Solution

Re: HD Partitioning

Hello.

The faster part of the drive is at the beginning - sector 0, where the first partition starts usually.

So put swap as first partition and you'll be fine, but don't expect superb performance because of this (if it starts swapping).

Regards,
Goran
Honored Contributor

Re: HD Partitioning


/dev/sda1 * 1 8 64228+ 83 Linux
/dev/sda2 9 72918 585649575 8e Linux LVM

/dev/sda1 is used for /boot.The partition (/dev/sda2) is in LVM control and We use / on lvol1 and swap on lvol2 .
Respected Contributor

Re: HD Partitioning

Thanks Goran, that makes sense.
Ik have a dedicated disk for swap so I just create a "small" first partition for the swap area and use the rest of disk to store data that hardly never accessed. I sure don't expect miracles but every bit helps.
Respected Contributor

Re: HD Partitioning

How about raid sets?
Can I assume this works in a simmilar way.
So if I want a really fast disk(partition) I would only use the first 10% of a raid 10 set.
Honored Contributor

Re: HD Partitioning

You seem to expect that the difference between the "fast" and "slow" parts of the disk is significant. This may or may not be true: the algorithms that manage the real disk geometry on modern disks are complicated and jealously-guarded secrets.

Before expending too much effort to building RAID sets, make a simple test:

Create three partitions. The first partition should take the first 10 % of the disk, the second 80 %, and the last should take the last 10%.
(The second partition is not important: it was created only to force the third partition to the very end of the disk.)

For a quick test, run "hdparm -t /dev/" a few times on each partition.

For a more accurate test, use bonnie (available in many Linux distributions, but often as an optional package only).

You could do a similar test for RAID sets too.

If you find that the "fast" part is at least 2x as fast as the "slow" part, there might be some real benefit; but if the difference is more like 1.05x (as I'd expect), the benefit would not be worth any significant effort.

If you really need a fast disk so much that you can afford to build RAID 10 sets and then use only the top 10% of them, you should be using your money to buy more RAM and/or Solid-State Drives instead.

MK
MK
Respected Contributor

Re: HD Partitioning

I don't expect the difference to be too great but you should also take into account that read/write head doesnâ t need to travel a whole lot when it only needs to cover the first 10% of the disk. My theory is that this will benefit access times.
Anyway I got this hardware and I want to make sure that I put it to good use. I just want to establish some good practice guideline for myself.
I see if I can manage those tests, could be interesting. Is there a good live cd that supports bonnie? Must run on HP proliant DL380G5.
Honored Contributor

Re: HD Partitioning

Actually the difference is great for sequential reads - as much as 2x or more.

But reality is that this doesn't mean much when things get fragmented.

As for RAID - it depends on how you RAID stuff: if you create individual partitions and then RAID those, the same criterium applies.

Goran
Respected Contributor

Re: HD Partitioning

I've done the bonnie++ test on DL380G5 with 8 disks in raid 10. The difference in performance is minimal!
Honored Contributor

Re: HD Partitioning

Well sure, the difference is big for a single disk configuration, RAID will of course help, especially RAID level 0.

Goran