Re: [OFFTOPIC] Re: IDE-DMA strangeness (another one)

Kurt Garloff (
Fri, 4 Dec 1998 14:40:06 +0100

On Thu, Dec 03, 1998 at 05:04:40PM +0100, Alex A.M.R. Slingerland wrote:
> On my ASUS P5A with Ali 5 chipset, a Quantum EL 5.1
> (and K6-2-300, 128Mb PC100 SDRAM), with hdparm 3.5 on Linux
> 2.1.126 and later, I get something like:
> $ hdparm -tT /dev/hda
> bla-bla 128Mb: 51 Mb/s
> bla-bla 64Mb : 11.19 Mb/s
> It's using PIO 4 (as linux doesn't currently support
> UDMA/DMA on my Ali chipset) and multcount is set to 8,
> io to 32 bits.
> Is this drive actually doing 11 Mb/s in PIO (not that
> I mind)?


> Does this mean I'm using (roughly, at least, on
> average) 11.19/16.66 ~= 2/3 of the CPU's processing
> power PIO-ing things off the drive (in e.g. a long
> running "just read and do nothing with the read data"
> test)? If true, the above suggests that neither the
> CPU nor the 16.66 Mb/s interface is a bottleneck (in
> the hdparm test), as this leaves about 1/3 of the CPU
> power for linux'
> housekeeping/context-switching/whatnot and hdparm,
> which I'm guessing would do. Or could I still expect a
> (significant) increase in
> _hdparm_measured_throughput_ when using UDMA/DMA
> (i.e., ignoring the effect the lower CPU load
> would/might have on a real app)?

Yes, it means your CPU spends ~ 2/3 of it's time PIOing the data from the
interface to the main memory. To make this more clear: The HD will read some
data to its internal cache and after it has filled a bit sends it to Linux.
Assuming the interface will provide the full 16.7 MB/s rate (no other IDE
disk transfering data ...) this takes ~2/3 of the time needed for collecting
the data. When transfering PIO data, the CPU can't do anything useful.
You can measure CPU utilization like that with bonnie. Use a file size
larger than your main memory.

DMA2/UDMA won't significantly increase your disk read speed for benchmarks
like this. This will change dramatically, when you have an application which
needs CPU time to process data.

Kurt Garloff <>  (Dortmund, FRG)
PGP key on

There is something frustrating about the quality and speed of Linux development. I.e. the quality is too high and the speed is too high, in other words, I can implement this XXXX feature, but I bet someone else has already done it and is just about to release his patch to Linus soon... [From a posting of Tigran Aivazian to linux-kernel, XXXX = disk stat]

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at