Re: IDE drive data transfer rates, kernel optimization?

Vojtech Pavlik (vojtech-lists@twilight.ucw.cz)
Thu, 6 Aug 1998 01:07:28 +0200


On Wed, Aug 05, 1998 at 10:49:23AM -0400, Mike A. Harris wrote:

> I am concerned about the advertised data rates of IDE hard disks,
> more specifically the "true maximum throughput" of said drives.

There is nothing like a "true maximum throughput". The resulting read speed
of the drive depends on many factors:

* IDE controller <-> RAM speed (PIO vs DMA vs BMDMA, ISA vs VLB vs PCI)
* The drive <-> IDE controller speed (DMA2 = 16.6 MB/s, UDMA = 33.3 MB/s)
* The drive's buffer size and multcount (70 - 1024KB, 1 - 32)
* The drive's internal data rate, which depends on: (80 - 500 Mb/s)
+ Rotational speed (3600 or 4500 or 5400 or 7200 or 10000 rpm)
+ Data density, which varies track by track

All in all, since the drives and controllers are able only of a very limited
parallelism, the final speed is given by the time it needs for the data to
get into the drive's buffer PLUS the time it needs to get the data from the
buffer to the host RAM. There are more issues with readahead, multcount and
such.

> I have a Quantum Fireball SE 4.3G drive that claims UDMA
> capability. I am getting 7.8Mb/s out of this drive. This is
> fast, and I can't complain, however it is nowhere near the rated
> capacity of the drive which is 33Mb/s on the SE pdf datasheet.

You can get about 13 MB/s (megabytes per second) using UDMA on a FB SE 4.3G.
Thats at the beginning of the drive, though. The inner tracks have less data
on them and thus less speed on the same rotational speed.

> Further inspection of the datasheet indicates that the drive has
> an internal buffer size of 128k. When I do an "hdparm -i" on the
> drive, it indicates:
>
> As you can see, it says "BuffSize=80kB". That is NOT 128k for
> sure.

As stated in the other mails, this happens because the drive's firmware uses
much of the memory for its own purposes, not as a data buffer.

> Some other interesting things... the pdf datasheet says that the
> drive has an internal data transfer rate (disk to buffer) of
> 158Mb/s. Other parts of the sheet refer to MEGABYTE as MB, so
> I'm assuming that Mb means megabit which makes more sense than
> does Megabyte for the number "158". So at 158 megabits per
> second data transfer from disk to buffer, we get:
>
> 158 / 8 = 19.75MB/s or 19 megabytes per second.

Yes, this calculation is right. Also notice that they say "up to 158 ..."

> This is NOT the rated 33megs per second that the sheet claims for
> UDMA operation.

This is even NOT related to it anyway. The 33 MB/s are external data rate.

> The rate for PIO/DMA is 16.6Mb/s. I get 7.8Mb/s
> or roughly half of spec. Does this mean that if I use UDMA, I
> can expect around double, or 15Mb/s? If so, that is far from
> 33Mb/s, and still not quite even the calculated 19.75Mb/s that
> the internal buffer supports.

Expect 13 MB/s, with good settings.

> What gives with these specs?

>From looking at the specs, you can say, "This drive is fast" "That one is
faster", but not much more. Real life performance can only be measured by
benchmarks, because it depends on too many factors to take into account.

> What is even more confusing is that
> at the bottom of the document it says "Quantum defines a megabyte
> as 1000000 bytes". That adds a hell of a lot of confusion to
> their datasheets, and accepted standards. I realize that Quantum
> is not the only drive manufacturer doing this however - they all
> do it.

Oh, yes, but they only define this megabyte for drive size measurement, not
for speed measurement, by the way. ;) To add more confusion.

> Question: How can one tell what the true speed will be for a
> given drive from a given manufacturer? Is there a formula? My
> formula is currently: rated-internal-buffer-rate/8 * 0.40
>
> Is this accurate?

No.

> At any rate, my kernel related question on this topic is, aside
> from the current support in the kernel, what new efforts are
> underway to get the most out of a hard disk? Does one need to go
> with a RAID array to get 33Mb/s?

You might be able to get 33 MB/s from a RAID on two IDE UDMA BMDMA channels,
with two very fast drives, though I don't think this really is possible.

With the design the IDE (or ATA) bus has, it is impossible to saturate it,
so that the real performance will always be much less than the peak
throughput.

> Can anyone shed light on getting more speed out of these drives?
> I'm currently using:
>
> /dev/hda:
> multcount = 16 (on)
> I/O support = 1 (32-bit)
> unmaskirq = 0 (off)
> using_dma = 0 (off)
> keepsettings = 0 (off)
> nowerr = 0 (off)
> readonly = 0 (off)
> readahead = 8 (on)
> geometry = 524/255/63, sectors = 8418816, start = 0
>
>
> Now back to your regularly scheduled programming. (pun intended)

You might try unmaskirq, however you won't get any drive performance gain.
Overall system performance may get better, though. Make sure you're using
UDMA. That can raise the numbers pretty nicely.

Have fun, Vojtech.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html