[mythtv-users] OT: best way to connect IDE harddrives and dvd

chris at cpr.homelinux.net chris at cpr.homelinux.net
Mon Sep 18 06:53:55 UTC 2006

On Sun, Sep 17, 2006 at 09:18:13AM -0400, Matt Mossholder wrote:
> 	I mostly agree, but one point to mention is that it is typically a good
> idea to make your swap partition be located at the outer edge of the
> disk, where the rotational speed of the disk give the most advantage to
> throughput.  

There are a lot of arguments to be made for and against each 
partition layout strategy.  In the days of ST-506 drives it made a 
lot of sense to benchmark and shuffle until you got good results, 
but these days you can do more harm than good.

It's true that on modern drives the outer cylinders have more 
sectors per track than the inner cylinders.  That doesn't mean that 
a specific sector will be read any sooner, however, as the disk 
doesn't spin any faster out there.  At 10,000 RPM you will need, on 
average, 3 milliseconds to read any random sector *anywhere on the 
disk*, assuming the head is already on the right track.  In most 
cases, head seek and settle times will swamp rotation latency as it 
will take substantially longer than 3 milliseconds to find the 
right track (typically 3ms to move to an adjacent track, 8-12ms to 
move to a random track, and 20+ms to move from one edge of the 
drive to the other).  For example, if the drive was reading from an 
inner track and suddenly needs to get data from swap on the outer 
track, the fact that it can read data faster out there is of no 
benefit if the drive has to seek the full width of the platter 
first.  There's one school of thought that says swap should be as 
close to the center cylinder as possible so that seek times are 
minimized.  That same line of thought says that the filesystems 
containing /bin and /usr/bin should be next to swap near the middle 
of the drive, with /var and /home distributed on either side.

It really depends on whether you are expecting long accesses or 
short accesses.  The long accesses (sequential reads from a 
contiguous file) will get the most benefit from being on the outer 

In the long run, however, there are three points that make all that 
"optimizing" a moot point:

(1) Most drives and/or drivers do command buffering and optimize 
based on real-time requirements.  For example, if the drive heads 
are on an inner track and there are 10 requests pending (including 
a read from the swap file on the outer track), the swap access may 
be the last task executed even if it was the second task in the 
queue because *on average* the best performance occurs when the 
heads don't change direction.

(2) Unlike the ST-506 days, the CHS values reported by IDE drives 
are totally fake.  Telling fdisk that you want a partition to be in 
the middle of the drive doesn't actually mean it will be on the 
middle cylinder.

(3) Drives do sector-substitution without your knowledge.  Three 
sequential LBA blocks are not always going to be in sequential 
sectors on the drive.

More information about the mythtv-users mailing list