From nobody@FreeBSD.org  Fri Feb 17 15:44:41 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9D15C16A420
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 17 Feb 2006 15:44:41 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4DE3143D46
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 17 Feb 2006 15:44:41 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k1HFifnX058546
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 17 Feb 2006 15:44:41 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k1HFiekS058545;
	Fri, 17 Feb 2006 15:44:40 GMT
	(envelope-from nobody)
Message-Id: <200602171544.k1HFiekS058545@www.freebsd.org>
Date: Fri, 17 Feb 2006 15:44:40 GMT
From: Barry Tigner <tigner@msu.edu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: iostat reports cd0 speeds 2X actual speed
X-Send-Pr-Version: www-2.3

>Number:         93485
>Category:       kern
>Synopsis:       iostat(8) reports cd0 speeds 2X actual speed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 17 15:50:12 GMT 2006
>Closed-Date:    Sun Apr 16 17:11:05 GMT 2006
>Last-Modified:  Sun Apr 16 17:11:05 GMT 2006
>Originator:     Barry Tigner
>Release:        6.0 release i386
>Organization:
Michigan State University
>Environment:
FreeBSD ESHOP1.PA.MSU.EDU 6.0-RELEASE FreeBSD 6.0-RELEASE #2: Thu Dec  8 08:38:04 EST 2005     root@ESHOP1.PA.MSU.EDU:/usr/src/sys/i386/compile/ESHOP1  i386       
>Description:
I have a new IDE DVD burner ,Toshiba TSDR5372 16X DL capable.

I wanted to investigate the read speeds of file transfers from
DVDs. To do this I made a 4.7G DVD with 4 1GB (2^30 bytes)files
on it named test1.bin test2.bin test3.bin test4.bin.

The system I am using details are:

Hardware:

Gigabyte GA-K8N-SLI
Athlon64/3500
512MB PC3200 ram
Toshiba TSDR5372 DVD writer
Seagate SATA 160G HD.

OS:
FreeBSD ESHOP1.PA.MSU.EDU 6.0-RELEASE FreeBSD 6.0-RELEASE #2: Thu Dec  8 08:38:04 EST 2005     root@ESHOP1.PA.MSU.EDU:/usr/src/sys/i386/compile/ESHOP1  i386

KDE 3.5

I mounted the DVD I created using the Toshiba DVD drive as /cdrom.

KDE reports the file transfer speeds correctly when I use the KDE
desktop to copy the 1GB files from the DVD to the HD.

If I run "iostat -w 1" as root while the transfer is occuring , the
transfer rate to AD4 shows correctly , however the transfer rate from
CD0 shows double the rate it should. Here is an example...

ESHOP1# iostat -w1
      tty             ad4              cd0            pass0             cpu
 tin tout  KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s  us ni sy in id
  12   66 19.96   3  0.05  63.84   0  0.00   0.00   0  0.00   2 11 64  1 22
 224  231 112.00  35  3.83  64.00 118  7.37   0.00   0  0.00   2  0  5  0 94
 168   78 126.74  89 11.00  64.00 354 22.10   0.00   0  0.00   5  0 13  2 80
  40   78 128.00 127 15.86  64.00 507 31.72   0.00   0  0.00   7  0 14  2 78
  56   78 124.58 131 15.92  64.00 507 31.72   0.00   0  0.00   8  0 14  5 74
   8   78 125.44 131 16.03  64.00 509 31.84   0.00   0  0.00   5  0 13  4 77
 312   78 127.12 128 15.87  64.00 509 31.84   0.00   0  0.00   9  0 14  1 77
  16   78 128.00 128 15.98  64.00 511 31.97   0.00   0  0.00  10  0 14  2 74
   0   78 124.61 132 16.05  64.00 513 32.09   0.00   0  0.00   8  0 14  0 79
   0   78 128.00 129 16.11  64.00 511 31.97   0.00   0  0.00   9  0 14  2 76
  24   78 126.26 129 15.89  64.00 507 31.72   0.00   0  0.00   8  0 17  1 75
   0   78 127.12 128 15.87  64.00 507 31.72   0.00   0  0.00   7  0 16  2 76
   0   78 126.26 129 15.89  64.00 507 31.72   0.00   0  0.00   5  0 16  1 78
  40   78 127.12 128 15.87  64.00 509 31.84   0.00   0  0.00   8  0 13  3 76

It can be clearly seen that the CD0 speeds are reported as 2X the AD4 speeds,
even though they should be identical since I am just copying from one media
to another.
>How-To-Repeat:
use iostat to monitor transfer rates on the cd0 device.   
>Fix:
be aware of the problem, so you don't get excited about 32MB/S transfer rates
from a DVD drive when they are actually 16MB/S.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Sun Apr 16 17:10:10 UTC 2006 
State-Changed-Why:  
Superseded by kern/95707 which has a patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=93485 
>Unformatted:
