From owner-freebsd-performance@FreeBSD.ORG Fri Jan 28 17:25:20 2011 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23B0F106564A for ; Fri, 28 Jan 2011 17:25:20 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id 6E8AE8FC19 for ; Fri, 28 Jan 2011 17:25:19 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Pis4T-0005s3-0N; Fri, 28 Jan 2011 20:25:17 +0300 Date: Fri, 28 Jan 2011 20:25:16 +0300 From: Slawa Olhovchenkov To: Julian Elischer Message-ID: <20110128172516.GG18170@zxy.spb.ru> References: <20110128143355.GD18170@zxy.spb.ru> <22E77EED-6455-4164-9115-BBD359EC8CA6@moneybookers.com> <20110128161035.GF18170@zxy.spb.ru> <4D42F87C.7020909@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D42F87C.7020909@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: freebsd-performance@freebsd.org, Stefan Lambrev Subject: Re: Interrupt performance X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2011 17:25:20 -0000 On Fri, Jan 28, 2011 at 09:10:20AM -0800, Julian Elischer wrote: > On 1/28/11 8:15 AM, Stefan Lambrev wrote: > > The overhead comes from badly written software. > > This software is optimized for linux and you have to optimize it for freebsd, then you will have the same overhead. > > All those *popular* benchmarks like hping, iperf, netperf have some strange optimizations for linux - we call them linuxism. > > Just search the archives - I'm pretty sure patches are flying around. > > > He wants to know why the freeBSD driver spends 8 x as much time on > each interrupt. Yes! > there are of course several possible answers, including: > > 1/ Sometimes BSD and Linux report things differently. Linux may or may not > account for the lowest level interrupt tie the same as BSD But I see only 20% idle on FreeBSD and 80% idle on Linux. > 2/ the BSD driver for that chip may be badly written, or may > be doing more or different work for some reason > 3/ the FreeBSD interrupt code may be misconfigured for that driver. > > or maybe combinations... > > there are profiling tools that you may decide to run. What tools I can use on amd64? I boot kernel configured with 'config -p'. Most time in spinlock_exit and acpi_cpu_c1. > > On Jan 28, 2011, at 6:10 PM, Slawa Olhovchenkov wrote: > > > >> On Fri, Jan 28, 2011 at 06:03:15PM +0200, Stefan Lambrev wrote: > >> > >>> Do the test with netblast ;) > >>> Most perf tools are written badly and for Linux. > >>> In our internal test netblast running on freebsd outperform everything else. > >> I don't speak about bad performance. > >> I speak about overhead. > >> > >> Linux: overhead 7% for 56K int/s > >> FreeBSD: overhead 59% for 14K int/s > >> > >> For processing 1/4 interrupts FreeBSD need 8x CPU. > >> > >>> P.S. - /usr/src/tools/tools/netrate/netblast - we have tested little more expensive card - em/igb and bce. > >>> > >>> On Jan 28, 2011, at 4:33 PM, Slawa Olhovchenkov wrote: > >>> > >>>> I test network performance and found some strange result -- on the > >>>> same hardware Linux more then 10x used CPU resources for interrupt > >>>> processing. > >>>> > >>>> FreeBSD system utilise 70% CPU (32% idle, 59% interrupt, 9% sys) and > >>>> network card generate 14K-18K interrupt per second. > >>>> > >>>> Linux system utilise 20% CPU (80% idle, 13% system, 3% hiq, 4% siq) > >>>> and network card generate 56K interrupt per second. > >>>> > >>>> I used 'netperf -H host -t UDP_STREAM -l 60 -C -c -- -m 8972 -s > >>>> 128K -S 128K' for generate network traffic. > >>>> > >>>> NIC: > >>>> > >>>> re0: port 0x4000-0x40ff mem 0xf0100000-0xf01000ff irq 19 at device 4.0 on pci11 > >>>> re0: Chip rev. 0x18000000 > >>>> re0: MAC rev. 0x00000000 > >>>> miibus0: on re0 > >>>> rgephy0: PHY 1 on miibus0 > >>>> > >>>> > >>>> CPU: > >>>> > >>>> CPU: Intel(R) Celeron(R) CPU 420 @ 1.60GHz (1596.05-MHz K8-class CPU) > >>>> Origin = "GenuineIntel" Id = 0x10661 Family = 6 Model = 16 > >>>> Stepping = 1 > >>>> Features=0xafebfbff > >>>> Features2=0xe31d > >>>> AMD Features=0x20100800 > >>>> AMD Features2=0x1 > >>>> TSC: P-state invariant > >>>> > >>>> RAM: one DDR2-667 DIMM. > >>>> > >>>> OS: 8.2-RC2, amd64 > >>>> > >>>> _______________________________________________ > >>>> freebsd-performance@freebsd.org mailing list > >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-performance > >>>> To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org" > >>> -- > >>> Best Wishes, > >>> Stefan Lambrev > >>> ICQ# 24134177 > >>> > >>> > >>> > >>> > >>> > >>> _______________________________________________ > >>> freebsd-performance@freebsd.org mailing list > >>> http://lists.freebsd.org/mailman/listinfo/freebsd-performance > >>> To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org" > > -- > > Best Wishes, > > Stefan Lambrev > > ICQ# 24134177 > > > > > > > > > > > > _______________________________________________ > > freebsd-performance@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-performance > > To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org" > > >