From owner-freebsd-java@FreeBSD.ORG Fri Nov 10 21:34:10 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 86C0416A40F for ; Fri, 10 Nov 2006 21:34:10 +0000 (UTC) (envelope-from ntarmos@ceid.upatras.gr) Received: from poseidon.ceid.upatras.gr (poseidon.ceid.upatras.gr [150.140.141.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3122D43D4C for ; Fri, 10 Nov 2006 21:34:08 +0000 (GMT) (envelope-from ntarmos@ceid.upatras.gr) Received: from rhea.ceid.upatras.gr (rhea.ceid.upatras.gr [150.140.141.171]) by poseidon.ceid.upatras.gr (Postfix) with ESMTP id 70F7B5C1B26 for ; Fri, 10 Nov 2006 23:34:07 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by rhea.ceid.upatras.gr (Postfix) with ESMTP id 6DEAA80001 for ; Fri, 10 Nov 2006 23:34:05 +0200 (EET) Received: from rhea.ceid.upatras.gr ([127.0.0.1]) by localhost (rhea [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01263-03 for ; Fri, 10 Nov 2006 23:34:04 +0200 (EET) Received: from ace.b020.ceid.upatras.gr (unknown [150.140.143.234]) by rhea.ceid.upatras.gr (Postfix) with ESMTP id 1E4BF80003 for ; Fri, 10 Nov 2006 23:34:03 +0200 (EET) Received: by ace.b020.ceid.upatras.gr (Postfix, from userid 1001) id D9FDC54; Fri, 10 Nov 2006 23:33:13 +0200 (EET) Date: Fri, 10 Nov 2006 23:33:13 +0200 From: Nikos Ntarmos To: freebsd-java@freebsd.org Message-ID: <20061110213313.GA72658@ace.b020.ceid.upatras.gr> Mail-Followup-To: freebsd-java@freebsd.org References: <20061110203714.GA89006@ace.b020.ceid.upatras.gr> <20061110124459.M88944@turing> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061110124459.M88944@turing> Organization: NetCInS Lab., C.E.I.D., U. of Patras, Greece WWW-Homepage: http://ntarmos.dyndns.org/ X-PGP-Fingerprint: 9680 60A7 DE60 0298 B1F0 9B22 9BA2 7569 CF95 160A Office-Phone: +30-2610-996919 Office-Fax: +30-2610-969011 GPS-Info: 38.31N, 21.82E User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Virus-Scanned: by amavisd-new at ceid.upatras.gr 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:34:10 -0000 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