From owner-freebsd-scsi@FreeBSD.ORG Wed Jun 21 21:17:00 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C6FF516A474 for ; Wed, 21 Jun 2006 21:17:00 +0000 (UTC) (envelope-from arcade@synergetica.dn.ua) Received: from nora.synergetica.dn.ua (synergetica.dn.ua [82.207.115.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 175EC43D48 for ; Wed, 21 Jun 2006 21:16:59 +0000 (GMT) (envelope-from arcade@synergetica.dn.ua) Received: from [172.30.0.209] (yarn.lan [172.30.0.209]) (authenticated bits=0) by nora.synergetica.dn.ua (8.13.7/8.13.7) with ESMTP id k5LLGuhk002722 for ; Thu, 22 Jun 2006 00:16:57 +0300 (EEST) (envelope-from arcade@synergetica.dn.ua) Message-ID: <4499B748.6040805@synergetica.dn.ua> Date: Thu, 22 Jun 2006 00:16:56 +0300 From: Volodymyr Kostyrko User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.8.0.4) Gecko/20060605 SeaMonkey/1.0.2 MIME-Version: 1.0 To: freebsd-scsi@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: ahd(4) poor performance X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2006 21:17:00 -0000 Hi all. I have: ahd0: 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: 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.