From owner-freebsd-current@FreeBSD.ORG Wed Mar 4 08:40:12 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D02B106564A; Wed, 4 Mar 2009 08:40:12 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id B23A08FC08; Wed, 4 Mar 2009 08:40:11 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=ndGObMz6TgMA:10 a=8nqVQ115KrMA:10 a=F9Ddb8ZnJZvc46m2WQEPHQ==:17 a=wCL8q2Vy6nRMSLN4IjoA:9 a=0rJnrDQ_hwtTIY29KBqKaBO4RTQA:4 a=50e4U0PicR4A:10 Received: from [85.19.79.136] (account mc467741@c2i.net HELO laptop.bitfrost.local) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1102165083; Wed, 04 Mar 2009 09:40:09 +0100 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Wed, 4 Mar 2009 09:42:38 +0100 User-Agent: KMail/1.9.7 References: <200903010045.44904.man@email.com.ua> <200903032243.31914.hselasky@c2i.net> <200903041028.37027.man@email.com.ua> In-Reply-To: <200903041028.37027.man@email.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903040942.39191.hselasky@c2i.net> Cc: Artyom Mirgorodsky , freebsd-usb@freebsd.org Subject: Knobs to reduce PCI interrupt latency [was: Low perfomance when read from usb flash drive] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2009 08:40:12 -0000 Hi, Do we have any knobs in FreeBSD to reduce the interrupt latency? I am currently seeing performance differences between 8.x and 7.x. Anyone have any ideas? --HPS On Wednesday 04 March 2009, Artyom Mirgorodsky wrote: > >Repeat the same test using FreeBSD -current. > > > >a) On the machine where it is slow. > > vmstat -i ; sleep 1 ; vmstat -i > interrupt total rate > irq1: atkbd0 233 2 > irq14: ata0 85 0 > irq16: vgapci0 5377 52 > irq21: hdac0 ohci0 742 7 > irq22: nfe0 ehci0 23610 229 > irq23: atapci1 5405 52 > cpu0: timer 203959 1980 > cpu1: timer 200914 1950 > Total 440325 4275 > interrupt total rate > irq1: atkbd0 234 2 > irq14: ata0 85 0 > irq16: vgapci0 5439 52 > irq21: hdac0 ohci0 742 7 > irq22: nfe0 ehci0 24621 236 > irq23: atapci1 5405 51 > cpu0: timer 205981 1980 > cpu1: timer 202937 1951 > Total 445444 4283 > > >I think the reduced performance can be explained by a clamp on the > > interrupt rate around 1000 interrupts per second instead of 8000. Maybe > > someone has an explanation for this? > > You right, the interrupt rate around 1000 (1011) on this machine, but on > FreeBSD 7.1 more 3000. If it is some kind of interrupt aggregation, may be > I can try to turn it off? > > >b) On the machine where it is fast. > > vmstat -i ; sleep 1 ; vmstat -i > interrupt total rate > irq4: uart0 4154 0 > irq14: ata0 472922 0 > irq15: ata1 26 0 > irq18: em0 752711 0 > irq21: ahc0 53 0 > irq23: ehci0 103456 0 > irq24: em1 147 0 > cpu0: timer 1551216517 2000 > cpu1: timer 1551195251 2000 > Total 3103745237 4001 > interrupt total rate > irq4: uart0 4154 0 > irq14: ata0 472923 0 > irq15: ata1 26 0 > irq18: em0 752713 0 > irq21: ahc0 53 0 > irq23: ehci0 110949 0 > irq24: em1 147 0 > cpu0: timer 1551218551 2000 > cpu1: timer 1551197285 2000 > Total 3103756801 4001