Subject: kern/13159: 50% degradation in ncr53c9x scsi write performance
To: None <gnats-bugs@gnats.netbsd.org>
From: None <chuq@chuq.com>
List: netbsd-bugs
Date: 06/10/2001 17:31:04
>Number:         13159
>Category:       kern
>Synopsis:       50% degradation in ncr53c9x scsi write performance
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 10 17:29:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Chuck Silvers
>Release:        May 21, 2001
>Organization:
me
>Environment:
	NetBSD sparc5 1.5V NetBSD 1.5V (CHUQ.perf) #9: Mon May 21 08:56:48 PDT 2001 chs@spathi.chuq.com:/home/chs/netbsd/src/sys/arch/sparc/compile/CHUQ.perf sparc


>Description:

scsi write performance has dropped considerably on my decstation 5000/200.
in the 1.5.1_ALPHA kernel that I've been using as my control case,
8000 64k writes to a raw device took 173 seconds, and as of about 
a month ago it took a comparable amount of time in -current.
today's -current takes 258 seconds to do the same writes.

another data point:  soda suggested I revert scsipi_base.c to rev 1.41,
which improved things somewhat.

version                 time (seconds)
-------                 --------------
1.5-branch              173
-current w/1.41         213
-current                258



this appears to be an MI problem, since I see this on a sparc5:

old kernel from long before the problem appeared:

7 sparc5:~ # uname -a
NetBSD sparc5 1.5T NetBSD 1.5T (CHUQ) #123: Fri Mar 23 04:18:18 PST 2001 chs@spathi.chuq.com:/home/chs/netbsd/src/sys/arch/sparc/compile/CHUQ sparc
8 sparc5:~ # time pt -w -c 8000 -s 65536 /dev/rsd0g
524288000 bytes transferred in 117.615 secs (4457647 bytes/sec)
0.070u 35.916s 1:57.69 30.5%    0+0k 0+1io 0pf+0w


more recent kernel with the problem:

1 sparc5:~ # uname -a
NetBSD sparc5 1.5V NetBSD 1.5V (CHUQ.perf) #9: Mon May 21 08:56:48 PDT 2001 chs@spathi.chuq.com:/home/chs/netbsd/src/sys/arch/sparc/compile/CHUQ.perf sparc
2 sparc5:~ # time pt -w -c 8000 -s 65536 /dev/rsd0g
524288000 bytes transferred in 174.965 secs (2996529 bytes/sec)
0.050u 18.404s 2:55.00 10.5%    0+0k 0+1io 0pf+0w


a kernel built from the thorpej_scsipi_beforemerge tag:

1 sparc5:~ # uname -a
NetBSD sparc5 1.5U NetBSD 1.5U (GENERIC) #1: Mon May 21 18:43:14 PDT 2001 chs@spathi.chuq.com:/home/chs/netbsd/src/tmp/syssrc/sys/arch/sparc/compile/GENERIC sparc
2 sparc5:~ # time pt -w -c 8000 -s 65536 /dev/rsd0g
524288000 bytes transferred in 99.793 secs (5253735 bytes/sec)
0.080u 19.214s 1:39.82 19.3%    0+0k 0+4io 0pf+0w



so it's looking like it's the thorpej_scsipi changes that have
caused the slowdown.


>How-To-Repeat:
	time scsi writes on an ncr53c9x-based adapter

>Fix:
	unknown.
>Release-Note:
>Audit-Trail:
>Unformatted: