From owner-freebsd-questions Sat Nov 6 4:34: 0 1999 Delivered-To: freebsd-questions@freebsd.org Received: from funkthat.com (adsl-63-195-54-213.dsl.snfc21.pacbell.net [63.195.54.213]) by hub.freebsd.org (Postfix) with ESMTP id C17C514DB9 for ; Sat, 6 Nov 1999 04:33:57 -0800 (PST) (envelope-from gurney_j@efn.org) Received: (from jmg@localhost) by funkthat.com (8.9.1/8.8.7) id EAA09781; Sat, 6 Nov 1999 04:33:49 -0800 (PST) Message-ID: <19991106043349.28321@hydrogen.fircrest.net> Date: Sat, 6 Nov 1999 04:33:49 -0800 From: John-Mark Gurney To: Rob Snow Cc: freebsd-questions@freebsd.org Subject: Re: writing much slower than reading... References: <9F147E391A3FD111B9A800805F356C52E25974@lgcadev001.zycor.lgc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.69 In-Reply-To: <9F147E391A3FD111B9A800805F356C52E25974@lgcadev001.zycor.lgc.com>; from Rob Snow on Sat, Nov 06, 1999 at 05:48:38AM -0600 Reply-To: John-Mark Gurney Organization: Cu Networking X-Operating-System: FreeBSD 3.0-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Rob Snow scribbled this message on Nov 6: [-- Warning: windows-1252 is not compatible with your display.] > Wow, I'm impressed! I bought the 10.1G 7200 last year for my Linux box, and > I thought it was fast! Do me a favor, run Bonnie on it, with a 256M file. ( > bonnie -s 256 ) > > Bonnie is in ports/benchmarks. running now... the numbers will be significantly slower because of the slow processor on the machine... I can not max out the drive when I'm going through the file system because the overhead is just to great... when going through the file system, I see 99% usage by the system... the results: # bonnie -s 256 File './Bonnie.4177', size: 268435456 -------Sequential Output-------- ---Sequential Input-- --Random-- -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks--- Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU 256 9333 97.1 15535 96.5 4591 34.7 9101 97.5 17984 92.3 123.2 4.8 as you notice, both of the block input/output still have 90+% cpu usage.. If I had a faster processor things would probably improve... but I'm still quite a ways away from what rawio reports.... > Now, on to your problem, am I reading something wrong? It looks like your > numbers are within 10% of each other. I should of been more specific... the problem is the system time, not the actual speed of the drive... notice that when writing it uses 8 times as much processor as when reading... it's interesting... rawio and dd use about 26% of the cpu to write to the disk, (plus or minus a percent), rawio when reading uses about the same cpu (slightly less), but dd when reading uses almost NO cpu, 3.6%.. the system should not have to do anything special, the worse would be to break it down to 4kb, but that isn't happening else I would get even worse performance (~12meg/sec)... and at 4kb, the processor isn't pegged and neither is the drive, is this an IDE limitation?? do the default IDE drivers not enable UDMA/66 which I know the MVP3 and the IBM drive support? benchmarks: # time rawio -c 128 -w /dev/rwd0s1g Random read Sequential read Random write Sequential write ID K/sec /sec K/sec /sec K/sec /sec K/sec /sec anon 28706.9 438 38.42 real 0.64 user 9.47 sys # time rawio -c 128 -r /dev/rwd0s1g Random read Sequential read Random write Sequential write ID K/sec /sec K/sec /sec K/sec /sec K/sec /sec anon 29258.5 446 37.71 real 0.41 user 8.94 sys # time dd if=/dev/zero of=/dev/rwd0s1g bs=64k count=16384 16384+0 records in 16384+0 records out 1073741824 bytes transferred in 50.254879 secs (21365922 bytes/sec) 50.30 real 0.05 user 13.40 sys # time dd if=/dev/rwd0s1g of=/dev/null bs=64k count=16384 16384+0 records in 16384+0 records out 1073741824 bytes transferred in 45.897254 secs (23394468 bytes/sec) 45.90 real 0.03 user 1.61 sys # time dd if=/dev/zero of=/dev/rwd0s1g bs=4k count=$((4*65536)) 262144+0 records in 262144+0 records out 1073741824 bytes transferred in 85.742358 secs (12522887 bytes/sec) 85.74 real 0.47 user 28.09 sys dmesg output: wdc0 at 0x1f0-0x1f7 irq 14 flags 0xa0ffa0ff on isa wdc0: unit 0 (wd0): , DMA, 32-bit, multi-block-16 wd0: 26105MB (53464320 sectors), 53040 cyls, 16 heads, 63 S/T, 512 B/S wd0: ATA INQUIRE valid = 0007, dmamword = 0007, apio = 0003, udma = 041f > > John-Mark Gurney wrote: > > > > > > 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... [benchmarks duplicated above] > > > now, why does it cost SOOO much more processing time to write than > > > read?? are there plans to fix this slow down? is it possible? can't > > > we just dma write out of userland since we are blocking on the write? -- John-Mark Gurney Voice: +1 408 975 9651 Cu Networking "The soul contains in itself the event that shall presently befall it. The event is only the actualizing of its thought." -- Ralph Waldo Emerson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message