Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Apr 2001 11:08:43 -0500
From:      Andrew Hesford <ajh3@chmod.ath.cx>
To:        Seth <aberrant@superconductor.rush.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ATA100 read/write perofrmance disparity
Message-ID:  <20010422110843.A99388@cec.wustl.edu>
In-Reply-To: <20010422114836.A6234@superconductor.rush.net>; from aberrant@superconductor.rush.net on Sun, Apr 22, 2001 at 11:48:36AM -0400
References:  <20010422114836.A6234@superconductor.rush.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Apr 22, 2001 at 11:48:36AM -0400, Seth wrote:
> using dd to test performance,with the new drive, I get
> dd if=/dev/zero of=/usr/foo bs=16384 count=16384
> 16384+0 records in
> 16384+0 records out
> 268435456 bytes transferred in 34.839972 secs (7704813 bytes/sec)
> 
> dd of=/dev/null if=/usr/foo bs=16384
> 16384+0 records in
> 16384+0 records out
> 268435456 bytes transferred in 10.272343 secs (26131863 bytes/sec)
> 
> Any ideas would be much appreciated.  FYI, during the write test,
> 'top' in another window took 6 seconds to come up, and there were
> significant (6-7 second) delays between "login" and "password" on the
> other vtys.

It seems to me that a dd test is not very reliable. For one thing, if
you make the block size 1, and increase the count accordingly, the time
to write the file will skyrocket. Try these two commands to see what I
mean:

	time dd if=/dev/zero of=test bs=1 count=1474000

and

	time dd if=/dev/zero of=test count=1 bs=1474000

For me, the first one takes 25 seconds to write. The second one takes
0.0903 seconds as reported by dd.

Of course, another thing to note is that you are using a multitasking
system, and other things are going on in the background. This is why
you run "time". Time will report the total elapsed real-world time
(which is what dd uses), but it will also decompose this into system and
user actual computing time. System sime is the time the kernel spends
doing this task, user time is time the userland program spends doing
this task. To see the difference, look at the output from my first timed
dd above:

	1474000+0 records in
	1474000+0 records out
	1474000 bytes transferred in 25.685091 secs (57387 bytes/sec)
	1.341u 12.919s 0:25.82 55.1%    82+200k 2+18io 4pf+0w

The first three lines are dd output, the last is the time output (time
is a userland command, but is also built into tcsh. This is the builtin
time you are seeing). The "1.341u" means dd spent 1.341 seconds on this
task. "12.919s" means the kernel spend twelve seconds on this task. In
total, the system only spent 13 seconds writing this file, but you had
to wait 25 because of background things. The 13 seconds is the actual
time you should use to compute I/O throughput.

But, as I said before, block size and count has a HUGE effect... For me,
writing one giant block instead of 1474000 little ones saved me 24
seconds, with the final task making me wait less than a second.

For a real disk I/O benchmark, try bonnie. It's in the ports tree.

NOTE: When I ran these dd tests, I was building Mozilla in the
background.

-- 
Andrew Hesford
ajh3@chmod.ath.cx

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010422110843.A99388>