From owner-freebsd-current@FreeBSD.ORG Sat May 1 10:27:27 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FF4E16A4CE for ; Sat, 1 May 2004 10:27:27 -0700 (PDT) Received: from out002.verizon.net (out002pub.verizon.net [206.46.170.141]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F39543D31 for ; Sat, 1 May 2004 10:27:27 -0700 (PDT) (envelope-from Alex.Kovalenko@verizon.net) Received: from RabbitsDen ([141.153.222.228]) by out002.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040501172726.NAPR9273.out002.verizon.net@RabbitsDen> for ; Sat, 1 May 2004 12:27:26 -0500 Date: Sat, 1 May 2004 12:25:58 -0400 From: Alexandre "Sunny" Kovalenko To: freebsd-current@freebsd.org Message-Id: <20040501122558.6139dec1.Alex.Kovalenko@verizon.net> In-Reply-To: <40911C45.8090909@fer.hr> References: <20040429111355.7eb83170.Alex.Kovalenko@verizon.net> <40911C45.8090909@fer.hr> Organization: Home X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out002.verizon.net from [141.153.222.228] at Sat, 1 May 2004 12:27:26 -0500 Subject: Re: Is it possible to make -lpthread program to use 100% CPU? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Sat, 01 May 2004 17:27:27 -0000 On Thu, 29 Apr 2004 17:16:21 +0200 Ivan Voras wrote: > Alexandre Sunny Kovalenko wrote: > > > Alternatively, if there is a need to test a patch or time a program > > in this environment, it could easily be accomplished -- it is a non- > > production box. > > Could you turn off Hyperthreading and report any changes? > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" I have updated my system to the latest CTM mailing on Friday (4/30) morning (EST). This includes version 1.176 of kern_thread.c. I have turned off hyperthreading and got result, which muddles me rather -- try as I might, with -lpthread I could not get past 50% CPU utilization (as reported by 'top') and number of computations per second matching that (number is very close to that for running single-threaded). Top report with thread view enabled shows that both KSE are bound to CPU 0 (if I am interpreting C column properly). Program, built with -lthr, maxed CPU for two threads and more with consistent increase in number of computations. Machine is dual 2.4GHz Xeon, HT capable. When I have enabled Hyperthreading again, the main impact of the update seems to be that 'top' reports 100% CPU utilization with either -lthr or -lpthread for four and more threads, however number of computations per second for program built with -lpthread is about 30% lower then same for program built with -lthr (~270,000 for -lpthread vs. ~370,000 for -lthr). Results are consistent across short runs (~1 minute per run) and long runs (~1 hr per run). Any suggestions, including RTFM (with pointer to FM) would be appreciated greatly. Again, if someone needs something tested on this box, let me know. Oh, yes -- last round of tests was round with SCHED_ULE only. -- Alexandre "Sunny" Kovalenko.