From owner-freebsd-performance@FreeBSD.ORG Fri Jan 28 17:45:01 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 E18B91065670 for ; Fri, 28 Jan 2011 17:45:01 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from g1.moneybookers.com (g1.moneybookers.com [217.18.249.148]) by mx1.freebsd.org (Postfix) with ESMTP id 16B888FC13 for ; Fri, 28 Jan 2011 17:45:00 +0000 (UTC) Received: from g1.moneybookers.com (localhost [127.0.0.1]) by g1.moneybookers.com (Postfix) with ESMTPS id 37277272C6C; Fri, 28 Jan 2011 18:44:59 +0100 (CET) Received: from jailbay5-inferno.sf.moneybookers.net (jailbay5-inferno.sf.moneybookers.net [10.128.2.69]) by g1.moneybookers.com (Postfix) with ESMTP id 5C561272C2F; Fri, 28 Jan 2011 18:44:57 +0100 (CET) Received: from hater.sf.moneybookers.net (hater.sf.moneybookers.net [10.129.23.125]) by jailbay5-inferno.sf.moneybookers.net (Postfix) with ESMTP id 3F0B43612153; Fri, 28 Jan 2011 18:44:57 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1082) From: Stefan Lambrev In-Reply-To: <20110128172516.GG18170@zxy.spb.ru> Date: Fri, 28 Jan 2011 19:44:57 +0200 Message-Id: References: <20110128143355.GD18170@zxy.spb.ru> <22E77EED-6455-4164-9115-BBD359EC8CA6@moneybookers.com> <20110128161035.GF18170@zxy.spb.ru> <4D42F87C.7020909@freebsd.org> <20110128172516.GG18170@zxy.spb.ru> To: Slawa Olhovchenkov X-Mailer: Apple Mail (2.1082) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on g1.sf.moneybookers.net Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-performance@freebsd.org, Julian Elischer 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:45:02 -0000 Hi, On Jan 28, 2011, at 7:25 PM, Slawa Olhovchenkov wrote: > On Fri, Jan 28, 2011 at 09:10:20AM -0800, Julian Elischer wrote: >=20 >> 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. >>=20 >>=20 >> He wants to know why the freeBSD driver spends 8 x as much time on=20 >> each interrupt. >=20 > Yes! >=20 >> there are of course several possible answers, including: >>=20 >> 1/ Sometimes BSD and Linux report things differently. Linux may or = may not >> account for the lowest level interrupt tie the same as BSD >=20 > But I see only 20% idle on FreeBSD and 80% idle on Linux. >=20 >> 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. >>=20 >> or maybe combinations... >>=20 >> there are profiling tools that you may decide to run. >=20 > What tools I can use on amd64? Look at this document - = http://software.intel.com/sites/oss/pdfs/profiling_debugging_freebsd_kerne= l_321772.pdf It contains brief information for all useful profiling tools, or just = google for "freebsd kernel profiling" I'm not sure what the situation with RealTek driver, but in the past = when I have done profiling, I saw that much of the CPU time was spent on expensive (for FreeBSD) calls, which where = very cheap in linux. >=20 > I boot kernel configured with 'config -p'. > Most time in spinlock_exit and acpi_cpu_c1. >=20 -- Best Wishes, Stefan Lambrev ICQ# 24134177