From owner-freebsd-java@FreeBSD.ORG Fri Nov 10 21:47:37 2006 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8501516A415 for ; Fri, 10 Nov 2006 21:47:37 +0000 (UTC) (envelope-from milo@cyberlifelabs.com) Received: from smtp.cyberlifelabs.com (197-39.84.64.master-link.com [64.84.39.197]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2099B43D49 for ; Fri, 10 Nov 2006 21:47:35 +0000 (GMT) (envelope-from milo@cyberlifelabs.com) Received: from [192.168.1.100] ([71.146.5.255]) (AUTH: LOGIN milo@cyberlifelabs.com) by mail.geo.cyberlifelabs.com with esmtp; Fri, 10 Nov 2006 13:47:32 -0800 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <20061110213313.GA72658@ace.b020.ceid.upatras.gr> References: <20061110203714.GA89006@ace.b020.ceid.upatras.gr> <20061110124459.M88944@turing> <20061110213313.GA72658@ace.b020.ceid.upatras.gr> Message-Id: From: Milo Hyson Date: Fri, 10 Nov 2006 13:47:31 -0800 To: freebsd-java@freebsd.org X-Mailer: Apple Mail (2.752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Performance of Java on FBSD vs. others... 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, 10 Nov 2006 21:47:37 -0000 Low-level benchmarks of the systems (e.g. bytebench) might help shed some light on things. I once found the apm module was dragging down my context-switching performance by a huge margin. I'm not saying that's the issue here, but eliminating some sort of low-level issue would help to narrow down the possibilities. -- Milo Hyson CyberLife Labs On Nov 10, 2006, at 13:33, Nikos Ntarmos wrote: > Hi Nick. > > On Fri, Nov 10, 2006 at 12:54:25PM -0800, Nick Johnson wrote: >> I suspect that even with only two threads, the threading >> implementation you use may make a difference. Check your >> /etc/libmap.conf and if it's easy to do, try again with the alternate >> thread implementations (libthr, libc_r) just for kicks. Refer to the >> man page for libmap.conf for an example. > > I'm using libthr, since libpthread has some stability problems for me. > Moreover, I've seen people report libthr as the fastest of the tree > implementations, so i thought i'd stick to that. Anyway, I also tested > against libpthread without any noticeable difference. There's no > libc_r > on my system, so it's not an option. > >> I'm not sure if the JVM uses shared memory segments, but you might >> want to sysctl -w kern.ipc.shm_use_phys=1 to keep shared memory from >> using swap. > > Did that too. No noticeable difference, though... > >> How are you setting your heap size? There could be performance >> differences between the memory allocators on different operating >> systems. What happens if you set -Xms and -Xmx to the same value (eg, >> 1024m) to get all of the allocation to happen up front? > > I was using -Xms256m -Xmx1024m. Tried with -Xms1024m -Xmx1024m, again > without any noticeable difference. > >> You might also play with /etc/malloc.conf if you find quirks of >> memory >> allocation. > > Malloc options are at their default (i.e. no /etc/malloc.conf). > >> Are you using -client or -server? > > -client (the default). Also tried with -server, without any noticeable > difference. > >> What about default GC tuning options? These can be platform- >> dependent. >> You may want to explicitly set these to compare apples to apples. > > My main consideration is not the fairness of the comparison but the > difference in speed. I've tried all possible -X combinations but > (guessed it?) without any noticeable difference; FreeBSD remains the > lagger... > >> I can't think of any other reason there'd be such a difference >> between >> OSes. Maybe someone else has some ideas. > > I was thinking something along the lines of "there are bits and pieces > of jre/jdk implemented in native code and fbsd doesn't have'em > yet", or > (hopefully) "you have to sysctl-turn a.b.c on"... > > I'm really interested in hunting this down, since I'm going to spend a > considerable part of the next few weeks running even larger > versions of > the program in question, and switching back and forth between freebsd > (OS-of-choice for coding) and win32 (apparently the fastest of the > three in executing the code) is a major pain (and loss of time). > > Thanks again. > > \n\n > _______________________________________________ > freebsd-java@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java- > unsubscribe@freebsd.org" >