Subject: bin/29637: dd returns invalid transfer speed and execution time
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <ianzag@megasignal.com>
List: netbsd-bugs
Date: 03/09/2005 10:59:01
>Number:         29637
>Category:       bin
>Synopsis:       dd returns invalid transfer speed and execution time
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 09 10:59:00 +0000 2005
>Originator:     Ian Zagorskih
>Release:        NetBSD-current
>Organization:
NGEDC
>Environment:
# uname -a
NetBSD MAKS 2.99.16 NetBSD 2.99.16 (Em104-n513-PXE) #3: Wed Mar  9 12:49:18 NOVT 2005  ianzag@IANZAG:/home/ianzag/NetBSD/kernel/Em104-n513-PXE i386

>Description:
I am running dd to measure file system access speed. Below is my quite weird results:

# dd if=/dev/zero of=/tmp/dat bs=1m count=2 2>&1 | tee /log
2+0 records in
2+0 records out
2097152 bytes transferred in 36.648 secs (57224 bytes/sec)

Note: dd actually runs about *one* second -> transfer time is invalid as a result seed is invalid too.

# uname -a
NetBSD MAKS 2.99.16 NetBSD 2.99.16 (Em104-n513-PXE) #3: Wed Mar  9 12:49:18 NOVT 2005  ianzag@IANZAG:/home/ianzag/NetBSD/kernel/Em104-n513-PXE i386

# df -k
Filesystem                   1K-blocks      Used     Avail Capacity  Mounted on
172.16.0.2:/var/project/maks    508023    148077    334545    30%    /
mfs:273                           3807      2052      1565    56%    /tmp

# dmesg
NetBSD 2.99.16 (Em104-n513-PXE) #3: Wed Mar  9 12:49:18 NOVT 2005
 ianzag@IANZAG:/home/ianzag/NetBSD/kernel/Em104-n513-PXE
total memory = 63612 KB
avail memory = 60416 KB
BIOS32 rev. 0 found at 0xfaf10
mainbus0 (root)
cpu0 at mainbus0: (uniprocessor)
cpu0: Cyrix MMX-enhanced MediaGX (GXm) (586-class), 300.69 MHz, id 0x540
cpu0: features 808131<FPU,TSC,MSR,CX8>
cpu0: features 808131<CMOV,MMX>
cpu0: "Geode(TM) Integrated Processor by National Semi"
cpu0: I-cache 12K uOp cache 8-way
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
vendor 0x1078 product 0x0001 (host bridge) at pci0 dev 0 function 0 not configured
rtk0 at pci0 dev 10 function 0: Realtek 8139 10/100BaseTX
rtk0: interrupting at irq 11
rtk0: Ethernet address 00:05:b7:02:66:d2
ukphy0 at rtk0 phy 7: Generic IEEE 802.3u media interface
ukphy0: OUI 0x000000, model 0x0000, rev. 0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pcib0 at pci0 dev 18 function 0
pcib0: vendor 0x1078 product 0x0100 (rev. 0x30)
vendor 0x1078 product 0x0101 (miscellaneous bridge) at pci0 dev 18 function 1 not configured
geodeide0 at pci0 dev 18 function 2
geodeide0: AMD Geode CX5530 IDE controller (rev. 0x00)
geodeide0: bus-master DMA support present
geodeide0: primary channel wired to compatibility mode
geodeide0: primary channel interrupting at irq 14
atabus0 at geodeide0 channel 0
geodeide0: secondary channel wired to compatibility mode
geodeide0: secondary channel interrupting at irq 15
atabus1 at geodeide0 channel 1
vendor 0x1078 product 0x0103 (audio multimedia) at pci0 dev 18 function 3 not configured
vga0 at pci0 dev 18 function 4: vendor 0x1078 product 0x0104 (rev. 0x00)
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
ohci0 at pci0 dev 19 function 0: vendor 0x0e11 product 0xa0f8 (rev. 0x06)
ohci0: interrupting at irq 11
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: vendor 0x0e11 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
isa0 at pcib0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
sysbeep0 at pcppi0
npx0 at isa0 port 0xf0-0xff: using exception 16
wd0 at atabus1 drive 0: <Hitachi XX.V.3.3.0.0>
wd0: drive supports 1-sector PIO transfers, LBA addressing
wd0: 122 MB, 978 cyl, 8 head, 32 sec, 512 bytes/sect x 250368 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4
wd0(geodeide0:1:0): using PIO mode 4
boot device: rtk0
root on rtk0
nfs_boot: trying DHCP/BOOTP
nfs_boot: DHCP next-server: 172.16.0.2
nfs_boot: my_name=MAKS
nfs_boot: my_addr=172.16.0.200
nfs_boot: my_mask=255.255.0.0
root on 172.16.0.2:/var/project/maks
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)

>How-To-Repeat:
Just play with dd a bit.
>Fix:
No fix at this moment.