ahd(4) poor performance

Volodymyr Kostyrko arcade at synergetica.dn.ua
Wed Jun 21 21:17:00 UTC 2006


Hi all.

   I have:

ahd0: <Adaptec (Dell OEM) 39320 Ultra320 SCSI adapter> port 
0xdc00-0xdcff,0xd800-0xd8ff mem 0xdfbfe000-0xdfbfffff irq 66 at device 
7.0 on pci3
ahd0: [GIANT-LOCKED]
aic7902: Ultra320 Wide Channel A, SCSI Id=7, PCI-X 101-133Mhz, 512 SCBs
ahd1: <Adaptec (Dell OEM) 39320 Ultra320 SCSI adapter> port 
0xd400-0xd4ff,0xd000-0xd0ff mem 0xdfbfc000-0xdfbfdfff irq 67 at device 
7.1 on pci3
ahd1: [GIANT-LOCKED]
aic7902: Ultra320 Wide Channel B, SCSI Id=7, PCI-X 101-133Mhz, 512 SCBs

   Booting machine also results in:

ahd0: Invalid Sequencer interrupt occurred.
 >>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<
ahd0: Dumping Card State at program address 0x23b Mode 0x0
Card was paused
INTSTAT[0x0] SELOID[0x1] SELID[0x0] HS_MAILBOX[0x0]
INTCTL[0x80] SEQINTSTAT[0x0] SAVED_MODE[0x11] DFFSTAT[0x33]
SCSISIGI[0x0] SCSIPHASE[0x0] SCSIBUS[0x0] LASTPHASE[0x1]
SCSISEQ0[0x0] SCSISEQ1[0x12] SEQCTL0[0x0] SEQINTCTL[0x6]
SEQ_FLAGS[0x0] SEQ_FLAGS2[0x0] QFREEZE_COUNT[0x2]
KERNEL_QFREEZE_COUNT[0x2] MK_MESSAGE_SCB[0xff00] MK_MESSAGE_SCSIID[0xff]
SSTAT0[0x0] SSTAT1[0x0] SSTAT2[0x0] SSTAT3[0x0] PERRDIAG[0x0]
SIMODE1[0xa4] LQISTAT0[0x0] LQISTAT1[0x0] LQISTAT2[0x0]
LQOSTAT0[0x0] LQOSTAT1[0x0] LQOSTAT2[0x0]

SCB Count = 16 CMDS_PENDING = 0 LASTSCB 0xffff CURRSCB 0x8 NEXTSCB 0xff00
qinstart = 29 qinfifonext = 29
QINFIFO:
WAITING_TID_QUEUES:
Pending list:
Total 0
Kernel Free SCB list: 8 15 1 2 3 4 5 6 7 9 10 11 12 13 14 0
Sequencer Complete DMA-inprog list:
Sequencer Complete list:
Sequencer DMA-Up and Complete list:
Sequencer On QFreeze and Complete list:


ahd0: FIFO0 Free, LONGJMP == 0x8000, SCB 0xf
SEQIMODE[0x3f] SEQINTSRC[0x0] DFCNTRL[0x0] DFSTATUS[0x89]
SG_CACHE_SHADOW[0x2] SG_STATE[0x0] DFFSXFRCTL[0x0]
SOFFCNT[0x0] MDFFSTAT[0x5] SHADDR = 0x00, SHCNT = 0x0
HADDR = 0x00, HCNT = 0x0 CCSGCTL[0x10]

ahd0: FIFO1 Free, LONGJMP == 0x8063, SCB 0x8
SEQIMODE[0x3f] SEQINTSRC[0x0] DFCNTRL[0x0] DFSTATUS[0x89]
SG_CACHE_SHADOW[0x2] SG_STATE[0x0] DFFSXFRCTL[0x0]
SOFFCNT[0x0] MDFFSTAT[0x5] SHADDR = 0x00, SHCNT = 0x0
HADDR = 0x00, HCNT = 0x0 CCSGCTL[0x10]
LQIN: 0x8 0x0 0x0 0xf 0x0 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 
0x0 0x0 0x0 0x0
ahd0: LQISTATE = 0x0, LQOSTATE = 0x0, OPTIONMODE = 0x42
ahd0: OS_SPACE_CNT = 0x20 MAXCMDCNT = 0x1
ahd0: SAVED_SCSIID = 0x0 SAVED_LUN = 0x0
SIMODE0[0xc]
CCSCBCTL[0x4]
ahd0: REG0 == 0xb960, SINDEX = 0x10e, DINDEX = 0x104
ahd0: SCBPTR == 0xf, SCB_NEXT == 0xff00, SCB_NEXT2 == 0xff20
CDB 12 40 0 80 88 86
STACK: 0x236 0x2 0x0 0x0 0x0 0x0 0x0 0x0
<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>
Copied 18 bytes of sense data offset 12: 0x70 0x0 0x6 0x0 0x0 0x0 0x0 
0xa 0x0 0x0 0x0 0x0 0x29 0x2 0x2 0x0 0x0 0x0
Copied 18 bytes of sense data offset 12: 0x70 0x0 0x6 0x0 0x0 0x0 0x0 
0xa 0x0 0x0 0x0 0x0 0x29 0x2 0x2 0x0 0x0 0x0

   Performance of SCSI drives is very good on copying files, etc. But it 
is very poor at large scale operations. For example, loading MySQL or 
PgSQL with INSERT's results in:

     2 users    Load  0.02  0.10  0.07                  21 чер 21:12

Mem:KB    REAL            VIRTUAL                     VN PAGER  SWAP PAGER
         Tot   Share      Tot    Share    Free         in  out     in  out
Act  106448   13964   378720    29372 1859780 count
All  186516   20436 72438316    46856         pages
                                                       129 zfod   Interrupts
Proc:r  p  d  s  w    Csw  Trp  Sys  Int  Sof  Flt     96 cow    8134 total
           22114      2807  598 5379  876   29  396  72152 wire     18 
4: sio0
                                                     87364 act 
14: ata
  1.5%Sys   0.0%Intr  0.4%User  0.0%Nice 98.1%Idl    31312 inact     2 
16: uhc
|    |    |    |    |    |    |    |    |    |         20 cache 
19: uhc
=                                                 1859760 free 
20: em1
                                                           daefr 
23: ehc
Namei         Name-cache    Dir-cache                 380 prcfr     2 
32: em0
     Calls     hits    %     hits    %                     react    94 
66: ahd
       867      835   96                                   pdwak 
67: ahd
                                                           pdpgs  2004 
cpu0: time
Disks   da0   da1   cd0 pass0 pass1 pass2                 intrn  2005 
cpu3: time
KB/t  16.19  0.00  0.00  0.00  0.00  0.00           53808 buf    2004 
cpu1: time
tps      94     0     0     0     0     0              81 dirty  2005 
cpu2: time
MB/s   1.48  0.00  0.00  0.00  0.00  0.00          100000 desiredvnodes
% busy  100     0     0     0     0     0            1733 numvnodes
                                                       345 freevnodes

^^^^^^^^^^^ and it gives me write speed near 3 Mb/s

   On the same hardware Linux runs perfectly.

   The problem can be reproduced on GENERIC/SMP kernel.

   Any thoughts? Am I just too dumb to miss something important.

   PS: And yes, I have removed device eisa.

-- 
[WBR], Arcade.


More information about the freebsd-scsi mailing list