From: Shawn Oles (oles@spectra.eng.hawaii.edu)
Date: 12/01/92


From: oles@spectra.eng.hawaii.edu (Shawn Oles)
Subject: Re: Why are hard disk reads so much slower than writes?
Date: Tue, 1 Dec 1992 08:38:31 GMT

In article <1992Nov30.202009.23793@u.washington.edu> writes:
>
>I have run iozone v. 1.16, a disk benchmark, on my system; I have
>a 386SX25 CPU, 4MB RAM, and two 65MB RLL hard disk drives. When
>(as the documentation suggests) I use a test file larger than the
>cache, iozone telss me that the effective writing speed is approxi-
>mately 315,000 Bytes per second, and the reading speed approximately
>53,000 Bytes per second. Some time ago I asked Linus; he told me
....

>he had not run iozone, but he guessed this effect might be due to
>a relatively slow processor and 1:1 interleave. Two days ago, af-
>ter a disk ... hmmmm ... accident ... I decided to change the inter-
>leaving and see if there was any change; surprisingly, the effective
>speedes did not change appreciably after I changed the interleaving
>from 1:1 to 1:2.
>
>Has anybody else seen anything like this? Is there any way to make
>disk reads not so much slower than writes?

I recently ran some similar tests and was suprised to find this as well.
On my 20MHZ 386 I was seeing 150K/sec reads and 200K/sec writes when
accessing a newly formated Minix file system.

I ran further tests and found that the peek transfer rate to be about
250K/sec when writing and reading to the raw device. My hypothesis is
that the read ahead routines in the Minix File System are actually slowing
the tranfer rate down! (because of the extra bmap() lookups and disk schedules)
I did not have time to verify this. Anyone want to try taking out the
read-ahead routines (fs/minix/file.c::minix_read()) to see if their file
system becomes faster? I guess this would be a worthwhile project for someone.

An interesting possibility here is that read ahead is only worthwhile if you
have CPU cycles to kill.

-shawn

-- 

-shawn