Should root partition be first partition?
m.seaman at black-earth.co.uk
Mon Feb 8 14:30:29 UTC 2010
On 08/02/2010 14:09, Peter Steele wrote:
> I've set up a system with gpart and have the swap partition first
> followed by root, var, and so on. This works fine but I've seen
> documents that always have root first, then swap. Is there any reason
> that root should be the first partition or can it follow swap space?
The root partition should always be the 'a' partition, but it doesn't
have to be the first in physical order on the disk (ie. starting at
cylinder 0). So long as partitions don't overlap (with the historical
exception of the 'c' partition, which should cover the whole drive) you
can put them in any order and starting at any offset. You can even
leave gaps between partitions if you want, but that is pretty crazy
since it just wastes some of the available space.
There have been quite a lot of recommendations on how to lay out a disk
for best performance, based on the observation that disk access times
vary depending on how far away the data is from the spindle, and the
expected usage patterns for the partition. Like any such advice, it
has tended to become less valid over time. Modern disks really don't
have any physical meaning to the Cylinder/Head/Sector style addressing
schemes[*] nowadays -- and you're pretty much bound to be using LBA
style addressing anyhow. Also, machines nowadays have so much RAM that
(a) swap is hardly ever used and (b) access to popular files is
frequently answered out of VM caches rathe than needing disk IO.
If your application is so demanding that you really need to squeeze out
the last drop of IO performance, then you're much better off investing
in fast SAS drives, a decent HW RAID controller with BBU and extra RAM.
Otherwise, don't sweat it. Lay out the disks in a way that makes sense
to you, and carry on with your life...
[*] But this still pops up in sysinstall, at the cost of much
bewilderment for the uninitiated.
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard, Flat 3
Black Earth Consulting Ramsgate
Kent, CT11 9PW
Free and Open Source Solutions Tel: +44 (0)1843 580647
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100208/cdb08729/signature.pgp
More information about the freebsd-questions