From owner-freebsd-current@FreeBSD.ORG Thu Apr 12 11:49:00 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E52F716A402; Thu, 12 Apr 2007 11:49:00 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-iport-2.cisco.com (sj-iport-2-in.cisco.com [171.71.176.71]) by mx1.freebsd.org (Postfix) with ESMTP id BBE9B13C45B; Thu, 12 Apr 2007 11:49:00 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-dkim-2.cisco.com ([171.71.179.186]) by sj-iport-2.cisco.com with ESMTP; 12 Apr 2007 04:49:01 -0700 X-IronPort-AV: i="4.14,400,1170662400"; d="scan'208"; a="369520895:sNHT52252492" Received: from sj-core-5.cisco.com (sj-core-5.cisco.com [171.71.177.238]) by sj-dkim-2.cisco.com (8.12.11/8.12.11) with ESMTP id l3CBn0w3022657; Thu, 12 Apr 2007 04:49:00 -0700 Received: from xbh-sjc-221.amer.cisco.com (xbh-sjc-221.cisco.com [128.107.191.63]) by sj-core-5.cisco.com (8.12.10/8.12.6) with ESMTP id l3CBn0Ei022298; Thu, 12 Apr 2007 11:49:00 GMT Received: from xfe-sjc-212.amer.cisco.com ([171.70.151.187]) by xbh-sjc-221.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 12 Apr 2007 04:49:00 -0700 Received: from [127.0.0.1] ([171.68.225.134]) by xfe-sjc-212.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 12 Apr 2007 04:48:59 -0700 Message-ID: <461E1D4E.3090806@cisco.com> Date: Thu, 12 Apr 2007 07:51:42 -0400 From: Randall Stewart User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061029 FreeBSD/i386 SeaMonkey/1.0.6 MIME-Version: 1.0 To: Robert Watson References: <461E0078.3050001@cisco.com> <20070412114344.G64803@fledge.watson.org> In-Reply-To: <20070412114344.G64803@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 12 Apr 2007 11:48:59.0738 (UTC) FILETIME=[8F11A3A0:01C77CF8] DKIM-Signature: v=0.5; a=rsa-sha256; q=dns/txt; l=3087; t=1176378540; x=1177242540; c=relaxed/simple; s=sjdkim2002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rrs@cisco.com; z=From:=20Randall=20Stewart=20 |Subject:=20Re=3A=20CPU=20utilization |Sender:=20; bh=b3h8eW1camos5Q/2RcESuB32TfezzGmbJXkId7/5yjA=; b=K7zdAGwlOg7FX9/XRPDED8nw+JzpRznK605lYxr7tyMIXM47EAgK/VsksmG8DfR+Vex0J8Sj 4j2Oi0a5wUV2jT5dFasnbReKwIVkP7wfFyiiM6Wpuj3did30rDPbFGO0; Authentication-Results: sj-dkim-2; header.From=rrs@cisco.com; dkim=pass (sig from cisco.com/sjdkim2002 verified; ); Cc: freebsd-current@FreeBSD.org, Brad Penoff , Janardhan Iyengar Subject: Re: CPU utilization 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: Thu, 12 Apr 2007 11:49:01 -0000 Robert: A few comments .. in line :-D Robert Watson wrote: > > On Thu, 12 Apr 2007, Randall Stewart wrote: > >> I have probably an old question that has been asked.. but here goes >> anyway. >> >> I have three machines. >> >> 1) stewart - running 7.0 (2.8gig p4 dual core) >> 2) bsd1 - running 7.0 (2.8gig Xeon Hyperthreaded) >> 3) bsd2 - running 6.2 (2.4gig Xeon Hyperthreaded) >> >> Now if I run tests that max out cpu (at least I think they do).. I see >> <1> or <2> drag down to 1% idle/ even 0 %idle. >> >> However <3> never drops below 50% idle.. it preforms a lot slower >> too.. which I expect since it is somewhat of an older processor.. but >> in running say top -S > > It strikes me that there are two possibilities here, and it could be > both are true: > > (1) In 7.x, there are scheduling and accounting changes that could > result in > both better utilization and different measurement. > > (2) In 7.x, certain debugging features default to on (WITNESS, INVARIANTS, > user space malloc debugging) that add significant (!) overhead. The first thing I do when I go to 7.0 is go edit out the malloc debug :-D.. and I know these machines do NOT have witness and invarients on.. I have a separate build that I use for that one :-D > > I'd confirm first that (2) isn't the cause of the change -- make sure > you have a kernel without debugging features turned on, and change the > man page on malloc.conf to make sure user debugging is turned off for > malloc. Then let's revisit (1). > I have some interesting results here that I think indicate something.. not sure.... when playing with the hyperthreading switches :-D Having hyperthreading OFF on the sender side (this is an SCTP test) and having hyperthreading ON on the receiver side seem to give me the best performance. When the 7.0 machine is the sender and the 6.2 machine the receiver in this config I get 930Mb (user data) on my gig link.. Thats pretty good :-D When I turn hyperthreading on in this layout for the sender we drop to 600Mb. Now reversing it.. the difference is not so dramatic. Having hyperthreading OFF on the sender (the 2.4 Gig 6.2 machine) and hyperthreading ON on the 2.8G 7.0 machine I see about 790Mb having hyperthreading on the sender as well we drop to around 690Nb. Also interestingly if fast machine is receiving, with no hyper theading.. I see around the same performance as the above.. 790Mb that does not happen when the 6.2/slow machine is the receiver.. I see 780Mb vs the 930Mb Soo.. I am thinking a couple of things about the SCTP code... a) I must have a lock contention issue on the sending side. b) The receiver side code does not have this issue and appears to work well with the hyperthreading.. I need to also go check out what is going on with H-T in the 7.0 as the sender and turn on mutex_profiling.. this may confirm my thoughts on this :-D R -- Randall Stewart NSSTG - Cisco Systems Inc. 803-345-0369 803-317-4952 (cell)