From owner-freebsd-hackers Sat Nov 6 9: 9: 3 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from sumatra.americantv.com (sumatra.americantv.com [208.139.222.227]) by hub.freebsd.org (Postfix) with ESMTP id 28E7914C92 for ; Sat, 6 Nov 1999 09:09:00 -0800 (PST) (envelope-from jlemon@americantv.com) Received: from right.PCS (right.PCS [148.105.10.31]) by sumatra.americantv.com (8.8.5/8.8.5) with ESMTP id LAA11044; Sat, 6 Nov 1999 11:08:59 -0600 (CST) Received: from free.pcs (free.PCS [148.105.10.51]) by right.PCS (8.8.5/8.6.4) with ESMTP id LAA08882; Sat, 6 Nov 1999 11:08:58 -0600 (CST) Received: (from jlemon@localhost) by free.pcs (8.8.6/8.8.5) id LAA25924; Sat, 6 Nov 1999 11:08:58 -0600 (CST) Date: Sat, 6 Nov 1999 11:08:58 -0600 (CST) From: Jonathan Lemon Message-Id: <199911061708.LAA25924@free.pcs> To: gurney_j@resnet.uoregon.edu, hackers@freebsd.org Subject: Re: writing much slower than reading... X-Newsgroups: local.mail.freebsd-hackers In-Reply-To: Organization: Architecture and Operating System Fanatics Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article you write: >well, I am working on writing a capture program to do 640x480x12bpp@30fps >to a raw disk, but writing to the raw device is SOOO slow... the reason >I say it's slow is the fact that it takes 8 times the system time writing >than reading... > >a bit about the system... k6/2-250, 100mhz system bus, pc100 64meg dimm, >VIA MVP3 chipset (IDE DMA enabled), IBM-DPTA-372730 hard disk, Hauppauge >WinCast/TV Model 61351 B226, 3.3-RELEASE... > >now the hard disk can push and pull around 20meg/sec w/o any problems.. >but when I time the disk I get: >$ time dd if=/dev/rwd0s1g of=/dev/null bs=64k count=2048 >2048+0 records in >2048+0 records out >134217728 bytes transferred in 5.747521 secs (23352281 bytes/sec) > 5.75 real 0.01 user 0.21 sys >$ time dd if=/dev/zero of=/dev/rwd0s1g bs=64k count=2048 >2048+0 records in >2048+0 records out >134217728 bytes transferred in 6.281820 secs (21366057 bytes/sec) > 6.28 real 0.00 user 1.68 sys Try doing `iostat 1' while doing the transfers. This is what I see here: tty da0 da1 da2 cpu tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id TEST A: 0.00 0 0.00 64.00 119 7.47 0.00 0 0.00 0 0 3 0 97 TEST B: 0.00 0 0.00 64.00 419 26.18 0.00 0 0.00 0 0 1 0 99 TEST C: 0.00 0 0.00 64.00 95 5.94 64.00 95 5.94 0 0 1 0 99 TEST D: 63.84 338 21.05 64.00 343 21.41 0.00 0 0.00 0 0 26 2 72 TEST A: (writing) dd if=/dev/zero of=/dev/rda1 bs=1m count=400 TEST B: (reading) dd if=/dev/rda1 of=/dev/zero bs=1m count=400 TEST C: (read & write) dd if=/dev/rda1 of=/dev/rda2 bs=1m count=400 TEST D: (read raw & write fs) dd if=/dev/rda1 of=trash bs=1m count=400 System is a Dell Poweredge 4300 PIII/600, all disks are Seagate ST39103LC. Disk da0 (where the trash file is written) has softupdates enabled. This is on a week old -current. I'm suprised by the last line. Writing to the filesystem is faster than writing to the raw device? I must be missing something here. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message