From owner-freebsd-java@FreeBSD.ORG Fri Apr 20 19:29:20 2007 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC45216A401; Fri, 20 Apr 2007 19:29:20 +0000 (UTC) (envelope-from sean@mcneil.com) Received: from mail.mcneil.com (mcneil.com [24.199.45.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6AC3413C501; Fri, 20 Apr 2007 19:29:20 +0000 (UTC) (envelope-from sean@mcneil.com) Received: from localhost (localhost.mcneil.com [127.0.0.1]) by mail.mcneil.com (Postfix) with ESMTP id 417DDF28A9; Fri, 20 Apr 2007 12:13:44 -0700 (PDT) X-Virus-Scanned: amavisd-new at mcneil.com Received: from mail.mcneil.com ([127.0.0.1]) by localhost (mcneil.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hN4tUtSfrNVZ; Fri, 20 Apr 2007 12:13:42 -0700 (PDT) Received: from [10.1.0.60] (mini.mcneil.com [10.1.0.60]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.mcneil.com (Postfix) with ESMTP id 8A97BF28A4; Fri, 20 Apr 2007 12:13:42 -0700 (PDT) Message-ID: <462910CF.8050602@mcneil.com> Date: Fri, 20 Apr 2007 12:13:19 -0700 From: Sean McNeil Organization: Sean McNeil Consulting, Inc User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: Greg Lewis References: <4626D4D5.7030303@thebeastie.org> <20070419031913.GA48411@xor.obsecurity.org> <462864C0.7060100@thebeastie.org> <20070420070934.GA5367@xor.obsecurity.org> <20070420185124.GA23914@misty.eyesbeyond.com> In-Reply-To: <20070420185124.GA23914@misty.eyesbeyond.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-performance@freebsd.org, freebsd-java@freebsd.org, Michael Vince , Kris Kennaway Subject: Re: Java performance on AMD64 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Apr 2007 19:29:20 -0000 Greg Lewis wrote: > On Fri, Apr 20, 2007 at 03:09:34AM -0400, Kris Kennaway wrote: > >> On Fri, Apr 20, 2007 at 04:59:12PM +1000, Michael Vince wrote: >> >>> Kris Kennaway wrote: >>> >>>> On Thu, Apr 19, 2007 at 12:32:53PM +1000, Michael Vince wrote: >>>> >>>> >>>>> Hey All, >>>>> I been benchmarking Diablo Java under AMD64 on 6.2R and using the same >>>>> methods I posted a while ago detailed somewhat here >>>>> http://lists.freebsd.org/pipermail/freebsd-java/2006-August/005576.html >>>>> >>>>> The difference here is that libthr now works under Amd64. >>>>> But it appears libthr to be about half the speed of libpthread under >>>>> AMD64 mode which is the opposite behavior when using it under i386. >>>>> >>>>> >>>> That's contrary to my benchmarks :( Dunno what might be wrong though, >>>> assuming you have checked all the obvious. >>>> >>>> Kris >>>> >>>> >>> OK, >>> I did more testing and it appears the 6.1R Diablo Java binary package on >>> Amd64 on 6.2/libthr appears to be the problem, it's as much as 60% >>> slower then libpthread. >>> >>> On 6.2R Amd64 I built the ports version of jdk1.5 and libthr appeared to >>> be around 25% faster then libpthread. >>> But using the Diablo jdk package for 6.1R on 6.2 under libpthread is >>> even faster by around 15% over anything I could do for any combination >>> of Java and libthr. >>> >>> I would guess that a new 6.2R Amd64 Diablo package would probably turn >>> it around again for libthr and I would guess it would again around 20% >>> faster then anything I can get from Java under AMD64 6.2R, what's going >>> on here exactly I don't know. >>> >> That's weird, I thought the diablo package was just compiled from >> jdk1.5. It could be there was a performance regression from a change >> made to the port after 6.1 - it would be great if you can follow it up >> with the java@ people. >> > > Diablo is compiled from the partner source. jdk15 is built on the SCSL > release. The SCSL release was done when 1.5.0 was released. The current > release of Diablo is based off of 1.5.0_07, so there were changes in between > the two that may/will affect performance. > I am confused why this is thought to be a problem with Java. Is it not true that libthr does not allow new threads to be scheduled on other CPUs? I thought that was the whole point of the difference between libthr and libpthread. This would mean that having additional CPUs would be beneficial to libpthread whereas it would not help libthr performance. Is all your testing being done on machines with the same number of CPUs?