Fedora Core 5 + WinXP Pro

Lyvim Xaphir knightmerc at yahoo.com
Fri Apr 21 23:29:42 UTC 2006


On Wed, 2006-04-19 at 20:25 +0200, Ingemar Nilsson wrote:
> Lyvim Xaphir <knightmerc at yahoo.com> writes:
> 
> > the first place.  First spot is the first spot.  First drive, and also
> > the first sectors of the hard drive, the prime real estate of the drive
> > where the accesses are faster.
> 
> Could you elaborate on why disk accesses are faster in the first sectors of
> the hard drive?
> 
> Regards
> Ingemar
> 

A drive's sectors actually start out on the rim of the drive. In that
area, you have more sectors per track (outer rim) than as you go closer
towards the spindle.  At the spindle you have the lowest sectors per
track.  Both the data rate and the sectors per track are greatest at the
rim of the hard drive; which is where the boot sector is too btw.  The
heads can stay on one track and transfer more contiguous data per
cylinder on cylinders at the rim than they can close to the spindle.

There is a progression of data rate from greatest (rim) to lowest
(spindle).  LBA 0 is at the outermost rim and maximum LBA is at the
spindle of the drive.  Therefore for maximum performance utilization of
a hard drive, the layout should go like this (as an example):

[root at localhost bin]# fdisk -l /dev/sdb

Disk /dev/sdb: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start    End      Blocks   Id  System
/dev/sdb1   *     1       10011   80413326 85  Linux extended
/dev/sdb5  (boot) 1       6       48132    fd  Linux raid autodetect
/dev/sdb6  (root) 7       50      353398+  fd  Linux raid autodetect
/dev/sdb7  (swap) 51      84      273073+  fd  Linux raid autodetect
/dev/sdb8  (tmp)  85      158     594373+  fd  Linux raid autodetect
/dev/sdb9  (usr)  159     456     2393653+ fd  Linux raid autodetect
/dev/sdb10 (var)  457     10011   76750506 fd  Linux raid autodetect

This is one drive of a raid-0 array.  /boot is raid-1 cause lilo is
unable to handle /boot partitions at raid-0.  It's better to have boot
mirrored rather than striped anyway.  I place /boot at the absolute
beginning because putting the boot partition there above the 1024
cylinder boundary sidesteps problems with some bioses that have
difficulty dealing with boot stuff over that boundary.  Root is the
first partition mounted and has some binaries used during the boot
process, plus it takes up a very negligible amount of room (600 megs)
when compared with this drive example, which is 80 gigabytes.

Swap is placed immediately after /root, and thus takes advantage of the
data rate in the forward sectors of the drive. /tmp filesystem has the
highest rate of filesystem change, so it's prioritized right after
swap. /usr of course has the lion's share of binaries utilized in
desktop mode so it has the next priority.  /Var then occupies the rest
of the drive (and the major part of it).  In this configuration, /home
is symlinked to /var/home.  There are many reasons for doing this but
the main one is that logfiles don't become a problem and neither does
the space occupied by users in /var/home.  I did an informal study of
filesystem activity back in the late 90's and /var and /home were the
most similar in that regard.  Rate of filesystem activity corresponds
closely to the risk of filesystem corruption.  Thus we generally
separate (filesystems) according to rate of file change; therefore
boxing the greater risk factors in their own private domains so that
they are not shared.  I should also note that space utilization becomes
too inefficient on a desktop box when you separate /home and /var.

This configuration was arrived at after a very long time of careful
deliberation over hard drive performance, filesystem corruption risks,
and concerns over most efficient utilization of hard drive space.  I
hope this answered your question.


Best Regards

LX

-- 
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
A wise person makes his own decisions, a weak one
obeys public opinion.          -- Chinese proverb
Registered Linux User #268899 http://counter.li.org/
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°





More information about the fedora-list mailing list