From owner-freebsd-scsi Mon Mar 27 16:15:29 2000 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 78FC537B87D for ; Mon, 27 Mar 2000 16:15:19 -0800 (PST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id RAA08095; Mon, 27 Mar 2000 17:15:15 -0700 (MST) (envelope-from ken) Date: Mon, 27 Mar 2000 17:15:15 -0700 From: "Kenneth D. Merry" To: Matthew Hanselman Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: Terrible SCSI performance with 4.0 -- please help Message-ID: <20000327171515.A8046@panzer.kdm.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from mjhans@cs.wisc.edu on Mon, Mar 27, 2000 at 06:01:56PM -0600 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, Mar 27, 2000 at 18:01:56 -0600, Matthew Hanselman wrote: > Before I get into the my message, thanks for the help! > > Here's my info: > > No errors, at least in /var/log/messages. Just the expected (?) diag re: > the controllers/disks upon boot, which mimics that of dmesg: > > da0 at ahc0 bus 0 target 0 lun 0 > da0: Fixed Direct Access SCSI-3 device > da0: 80.000MB/s transfers (40.000MHz, offset 31, 16bit), Tagged Queueing Enabled > da0: 17501MB (35843670 512 byte sectors: 255H 63S/T 2231C) > > (Same for da1, 2, and 3) > > Here's the IDE disk, FYI: > ad0: 6149MB [13328/15/63] at ata0-master using UDMA33 > > > As for caching, I don't know how to make out all of these options, but > here's your requested info from camcontrol: > > IC: 0 > ABPF: 0 > CAP: 0 > DISC: 0 > SIZE: 0 > WCE: 0 WCE == 0 means write caching is disabled. > Getting into benchmarking: Funny thing is bonnie makes it look as though > the drives are similar. Here was my original benchmark that confirms disk > times: copying a tar file of size 26M to a directory and untarring it into > the same directory, doing so a couple of times to take caching into > account. Here's the output time from that: > > For the IDE disk: > % time tar xf apache.tar > 0.071u 1.559s 0:05.62 28.8% 318+308k 2+1996io 0pf+0w > > For the SCSI disk: > % time tar xf apache.tar > 0.095u 1.396s 0:10.11 14.6% 313+303k 2+2166io 0pf+0w Write caching could be affecting your results somewhat in comparison to the IDE drive. You can try enabling write caching for your SCSI disk, like this: camcontrol modepage da0 -m 8 -P 3 -e Then change the 'WCE' bit from 0 to 1. > Here's bonnie output for the IDE disk: > -------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 > 60 13247 97.2 18640 51.0 23199 75.2 16173 99.9 95878 100.0 11389.4 97.4 > > This seems to be taking about about 50% user and about 40% system time > > For the SCSI disk: > -------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 > 60 12845 96.6 27812 73.4 30856 93.6 15726 99.6 96393 98.8 11477.9 99.8 > > This seems to be taking about 60% user and about 30% system time... Your SCSI disk looks like it is significantly faster than the IDE disk for sequential writes -- 28MB/sec block writes versus 18.6MB/sec. > Finally, iozone for the IDE disk: > random random > KB reclen write rewrite read reread read write > 60000 4 14156 17189 61853 72246 52582 831 > > bkwd record stride > read rewrite read fwrite frewrite fread freread > 50540 120910 62517 14640 17569 49850 60480 > > > And for the SCSI disk (Note the write being 95% bigger, etc): > random random > KB reclen write rewrite read reread read write > 60000 4 27227 28223 86392 65592 67151 1213 > > bkwd record stride > read rewrite read fwrite frewrite fread freread > 88551 115087 67553 21548 18198 51120 75003 > > top said the CPU was mostly idle (around 80-90% idle) during these... > > Any ideas? I'm not sure you really have a problem here. It looks like your SCSI disks are faster than your generally faster than your IDE disk. It makes sense that you'd use more CPU with the SCSI disks, since you're doing more I/O to them than the IDE disk. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message