[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-java
Subject:    jdk1.3 and jit
From:       Richard Scranton <scrantr () ix ! netcom ! com>
Date:       2000-11-26 7:25:00
[Download RAW message or body]

After only a little tinkering, I managed to get the current Sun JDK1.3 for Linux to
run under 4.1R, along with the current version of OpenJIT as posted on its web site.

http://www.openjit.org/

The binaries posted for use with the Blackdown 1.2.2 release work well enough
with the Sun 1.3.0 (classic VM) to run a number of large and complex packages,
including Object International's "Together 4" UML and design package.  I have
been experimenting with the "Whiteboard Edition," which requires a Java2
interpreter.


--
________________________________________________________________________
Technology is dominated by those who manage what they do not understand.
http://www.netcom.com/~scrantr/index.html





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


Delivered-To: freebsd-java@freebsd.org
Received: from topperwein.dyndns.org (acs-24-154-28-99.zoominternet.net \
[24.154.28.99])  by hub.freebsd.org (Postfix) with ESMTP id 33AFF37B4CF
	for <java@freebsd.org>; Sun, 26 Nov 2000 12:58:50 -0800 (PST)
Received: from browning.pennasoft.com (browning [192.168.168.11])
	by topperwein.dyndns.org (8.11.1/8.11.1) with ESMTP id eAQKxf522706
	for <java@freebsd.org>; Sun, 26 Nov 2000 15:59:41 -0500 (EST)
	(envelope-from behanna@zbzoom.net)
Date: Sun, 26 Nov 2000 16:03:26 -0500 (EST)
From: Chris BeHanna <behanna@zbzoom.net>
Reply-To: behanna@zbzoom.net
To: java@freebsd.org
Subject: Re: Java et al
In-Reply-To: <Pine.BSF.4.21.0011210301180.90238-100000@snafu.adept.org>
Message-ID: <Pine.BSF.4.21.0011261552570.23974-100000@browning.pennasoft.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

On Tue, 21 Nov 2000, Mike Hoskins wrote:

> Excuse this if it's off-topic...  I couldn't think of the best place to
> ask this, and I am running STABLE on all production machines, so...
> 
> We have a lot of proprietary code written in Java running on Wintel
> boxes.  There's been talk of migrating to Linux, and our initial tests
> show performance equal to NT 4.0 under the JDK/JVM's we've tested.
> 
> Is there anyone out there running a lot of mission-critical
> (read: updating Oracle queues responsible for 911 dispatching) Java code
> under FreeBSD?

    I don't know that anyone will certify FreeBSD as OK for mission-
critical systems, and Java expressly disclaims suitability for mission-
critical applications.  IMHO, this is CYA more than anything else--no
one wants to be sued if air traffic control software written in Java
running on FreeBSD or some other platform routes two jumbo jets to the
same runway at the same time.

> If so, I'd appreciate JDK/JVM reccomendations, OS tuning tips (or relevant
> FAQs), etc.  If not...  I guess I'll resign myself to letting penguins
> slowly infiltrate my network (ack!).

    On a system that has kernel threads (i.e., not FreeBSD 4.x, but
coming in 5.x, IIUC), IBM JDK 1.3 with HotSpot enabled is wicked fast
compared to Blackdown JDK 1.2.2 (note that Blackdown 1.3.0 just came
out recently, and I'm trying to get it up and running here--so far so
good, but it complains about alt sigstack allocations--apparently
Andrew Gallatin's Linux sighandling patches did not make it into 4.2).
On a platform that doesn't have native kernel threads (e.g., FreeBSD
4.x), HotSpot will still be faster than JDK 1.2.2 with sunwjit, but
the results will not be nearly as dramatic.  For now, IIUC, ShuJIT is
the hot JIT to use on FreeBSD.

    I am presently working on getting the native FreeBSD JDK 1.2.2
port to work, because I believe that will be the stable fallback to
use for other applications (e.g., Star Office).  Blackdown JDK 1.3.0
will be an interesting exercise, but as I mentioned, I have to apply
Andrew Gallatin's patches to my kernel first.

    FWIW, the Linux-JDK 1.2.2 port ran just dandy on 4.1.1-STABLE.

    Note, however, that you'll have the same issues running Oracle on
FreeBSD that you have running JDK 1.3.0--namely, Oracle will expect
some Linux signal-handling capabilities that only exist in Andrew
Gallatin's patches.

--
Chris BeHanna
Software Engineer
behanna@bogus.zbzoom.net   Remove "bogus" before responding.




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


Delivered-To: freebsd-java@freebsd.org
Received: from smtp10.atl.mindspring.net (smtp10.atl.mindspring.net [207.69.200.246])
	by hub.freebsd.org (Postfix) with ESMTP id 6322B37B479
	for <freebsd-java@freebsd.org>; Mon, 27 Nov 2000 21:09:05 -0800 (PST)
Received: from ix.netcom.com (col-oh34-85.ix.netcom.com [207.220.178.85])
	by smtp10.atl.mindspring.net (8.9.3/8.8.5) with ESMTP id AAA00291;
	Tue, 28 Nov 2000 00:09:03 -0500 (EST)
Message-ID: <3A233E6D.20C3E9DF@ix.netcom.com>
Date: Tue, 28 Nov 2000 00:11:09 -0500
From: Richard Scranton <scrantr@ix.netcom.com>
Reply-To: scrantr@ix.netcom.com
Organization: Online Computer Library Center, Inc.
X-Mailer: Mozilla 4.75 [en] (X11; U; FreeBSD 4.1-RELEASE i386)
X-Accept-Language: en-US, en
MIME-Version: 1.0
To: freebsd-java@freebsd.org
Subject: Forte Community Edition v1.0 update 2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org


If you install Sun's JDK1.3 for Linux, you can run the most recent release for Sun's \
Forte Community Edition and develop for Java within a reasonably nice GUI.  Here's \
how...

        Edit the file $JAVA_HOME/jre/lib/font.properties to comment out references to \
                fonts
        containing the strings "symbol" and "adobe-fontspecific" by adding a "#" at \
                the beginning
        of the line.  Don't forget the lines containing "CharToByteSymbol" too.

        If you have installed the OpenJIT just-in-time-compiler, you will need to \
                disable it
        temporarily, as it causes problems for the installer.  Typing "unset \
                JAVA_COMPILER"
        should suffice.  Once the package is installed, it runs normally with the jit \
enabled.

        Go to Sun's www.javasoft.com web site and find Forte Community Edition.  \
                Download the
        Solaris package.  It is a little over 12 megs.  Install it by typing "sh \
forte_ce_1_0_2.sh"  and follow the directions from there.


--
________________________________________________________________________
Technology is dominated by those who manage what they do not understand.
http://www.netcom.com/~scrantr/index.html





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


Delivered-To: freebsd-java@freebsd.org
Received: from ntua.gr (achilles.noc.ntua.gr [147.102.222.210])
	by hub.freebsd.org (Postfix) with ESMTP id DCD1537B400
	for <java@FreeBSD.ORG>; Tue, 28 Nov 2000 02:21:20 -0800 (PST)
Received: from netmode.ntua.gr (dolly.netmode.ece.ntua.gr [147.102.13.10])
	by ntua.gr (8.9.3/8.9.3) with ESMTP id MAA20498;
	Tue, 28 Nov 2000 12:21:14 +0200 (EET)
Received: (from past@localhost)
	by netmode.ntua.gr (8.11.1/8.11.1) id eASASGk75280;
	Tue, 28 Nov 2000 12:28:16 +0200 (EET)
	(envelope-from past)
Date: Tue, 28 Nov 2000 12:28:16 +0200
From: Panagiotis Astithas <past@netmode.ntua.gr>
To: Chris BeHanna <behanna@zbzoom.net>
Cc: java@FreeBSD.ORG
Subject: Re: Java et al
Message-ID: <20001128122816.A74372@netmode.ece.ntua.gr>
Reply-To: past@netmode.ntua.gr
References: <Pine.BSF.4.21.0011210301180.90238-100000@snafu.adept.org> \
                <Pine.BSF.4.21.0011261552570.23974-100000@browning.pennasoft.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <Pine.BSF.4.21.0011261552570.23974-100000@browning.pennasoft.com>; from \
                behanna@zbzoom.net on Sun, Nov 26, 2000 at 04:03:26PM -0500
X-Organizational-Unit: Network Management and Optimal Design Laboratory
X-Organization: National Technical University of Athens, GREECE
X-Work-Phone: +30-1-772-1-450
X-Work-FAX: +30-1-772-1-452
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

On Sun, Nov 26, 2000 at 04:03:26PM -0500, Chris BeHanna wrote:
> the results will not be nearly as dramatic.  For now, IIUC, ShuJIT is
> the hot JIT to use on FreeBSD.

> From the various comparisons that I have seen, my understanding is that
OpenJIT is the fastest, as long as you don't mind the increased startup
time.

-past


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


Delivered-To: freebsd-java@freebsd.org
Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187])
	by hub.freebsd.org (Postfix) with ESMTP id EE0D037B400
	for <freebsd-java@freebsd.org>; Thu, 30 Nov 2000 15:55:41 -0800 (PST)
Received: (from ernst@localhost)
	by heinz.jollem.com (8.11.1/8.9.3) id eAUNsoj27122;
	Fri, 1 Dec 2000 00:54:50 +0100 (CET)
	(envelope-from ernst)
Date: Fri, 1 Dec 2000 00:54:50 +0100
From: Ernst de Haan <ernst@jollem.com>
To: FreeBSD Java mailing list <freebsd-java@freebsd.org>
Cc: Yura Cangea <yura@notepad.com>,
	Alex Chudnovsky <chud73@yahoo.com>
Subject: Performance hint for JDK on FreeBSD
Message-ID: <20001201005450.A27077@c187104187.telekabel.chello.nl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

Hi,


It seems that the startup of the JVM got a major performance boost when I
changed my font.properties to get rid of the annoying `Font not found'
messages. I went from a startup of ~ 2600 ms to around 500 ms. Does anyone
have similar experiences?

This applies to both the native FreeBSD JDK 1.2.2b10 and to the Sun Linux JDK
1.3.0_01.


Ernst

PS: My system is a P2-400, 256 MB, U2W, XFree86 4.0.1f, GeForce 2 MX.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


Delivered-To: freebsd-java@freebsd.org
Received: from daedalus.cs.brandeis.edu (daedalus.cs.brandeis.edu [129.64.3.179])
	by hub.freebsd.org (Postfix) with ESMTP id 85C0537B402
	for <freebsd-java@FreeBSD.ORG>; Thu, 30 Nov 2000 16:00:13 -0800 (PST)
Received: from localhost (meshko@localhost)
	by daedalus.cs.brandeis.edu (8.9.3/8.9.3) with ESMTP id TAA17261;
	Thu, 30 Nov 2000 19:00:08 -0500
Date: Thu, 30 Nov 2000 19:00:08 -0500 (EST)
From: Mikhail Kruk <meshko@cs.brandeis.edu>
To: Ernst de Haan <ernst@jollem.com>
Cc: FreeBSD Java mailing list <freebsd-java@FreeBSD.ORG>
Subject: Re: Performance hint for JDK on FreeBSD
In-Reply-To: <20001201005450.A27077@c187104187.telekabel.chello.nl>
Message-ID: <Pine.LNX.4.30.0011301857330.15358-100000@daedalus.cs.brandeis.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

unfortunately makeing it start up faster does not solve the general
performance issues...
does anyone know if the patches needed to run IBM JDK are going to be
included in some future release? I don't feel like adding unsupported
functionality to the kernel but would really love to use IBM JDK.
Well, any exerpiences of running IBM JDK with those patches are welcome
too. Especially with 1.1.8 version, I find it faster and more reliable.
mk



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


Delivered-To: freebsd-java@freebsd.org
Received: from www.kpi.com.au (www.kpi.com.au [203.39.132.210])
	by hub.freebsd.org (Postfix) with ESMTP id 6E0C837B402
	for <freebsd-java@FreeBSD.ORG>; Thu, 30 Nov 2000 16:00:57 -0800 (PST)
Received: from grail (www.kpi.com.au [203.39.132.210])
	by www.kpi.com.au (8.9.3/8.9.3) with SMTP id LAA71655;
	Fri, 1 Dec 2000 11:04:56 +1100 (EST)
	(envelope-from shevlandj@kpi.com.au)
From: "Joe Shevland" <shevlandj@kpi.com.au>
To: "Ernst de Haan" <ernst@jollem.com>,
	"FreeBSD Java mailing list" <freebsd-java@FreeBSD.ORG>
Subject: RE: Performance hint for JDK on FreeBSD
Date: Fri, 1 Dec 2000 11:00:26 +1100
Message-ID: <IOEALGALKLLJILALBBOMAENFCFAA.shevlandj@kpi.com.au>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
In-Reply-To: <20001201005450.A27077@c187104187.telekabel.chello.nl>
Importance: Normal
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

I'm not actually seeing these 'Font not found' messages; is this only if you're \
running under X (no X on my box)?

Regards,
Joe

> -----Original Message-----
> From: owner-freebsd-java@FreeBSD.ORG
> [mailto:owner-freebsd-java@FreeBSD.ORG]On Behalf Of Ernst de Haan
> Sent: Friday, 1 December 2000 10:55 AM
> To: FreeBSD Java mailing list
> Cc: Yura Cangea; Alex Chudnovsky
> Subject: Performance hint for JDK on FreeBSD
> 
> 
> Hi,
> 
> 
> It seems that the startup of the JVM got a major performance boost when I
> changed my font.properties to get rid of the annoying `Font not found'
> messages. I went from a startup of ~ 2600 ms to around 500 ms. Does anyone
> have similar experiences?
> 
> This applies to both the native FreeBSD JDK 1.2.2b10 and to the 
> Sun Linux JDK
> 1.3.0_01.
> 
> 
> Ernst
> 
> PS: My system is a P2-400, 256 MB, U2W, XFree86 4.0.1f, GeForce 2 MX.
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-java" in the body of the message
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


Delivered-To: freebsd-java@freebsd.org
Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66])
	by hub.freebsd.org (Postfix) with ESMTP id 89E7937B400
	for <freebsd-java@FreeBSD.ORG>; Thu, 30 Nov 2000 16:27:54 -0800 (PST)
Received: from nomad.yogotech.com (nomad.yogotech.com [206.127.123.131])
	by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id RAA23675;
	Thu, 30 Nov 2000 17:27:47 -0700 (MST)
	(envelope-from nate@nomad.yogotech.com)
Received: (from nate@localhost)
	by nomad.yogotech.com (8.8.8/8.8.8) id RAA27406;
	Thu, 30 Nov 2000 17:27:46 -0700 (MST)
	(envelope-from nate)
From: Nate Williams <nate@yogotech.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <14886.61569.423576.956369@nomad.yogotech.com>
Date: Thu, 30 Nov 2000 17:27:45 -0700 (MST)
To: Mikhail Kruk <meshko@cs.brandeis.edu>
Cc: Ernst de Haan <ernst@jollem.com>,
	FreeBSD Java mailing list <freebsd-java@FreeBSD.ORG>
Subject: Re: Performance hint for JDK on FreeBSD
In-Reply-To: <Pine.LNX.4.30.0011301857330.15358-100000@daedalus.cs.brandeis.edu>
References: <20001201005450.A27077@c187104187.telekabel.chello.nl>
	<Pine.LNX.4.30.0011301857330.15358-100000@daedalus.cs.brandeis.edu>
X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid
Reply-To: nate@yogotech.com (Nate Williams)
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

> unfortunately makeing it start up faster does not solve the general
> performance issues...
> does anyone know if the patches needed to run IBM JDK are going to be
> included in some future release?

Drew Gallatin merged a number of changes right after 4.2 was released.
I'm not sure if they work on the x86, but I'm running Compaq's Linux-JVM
on the Alpha they donated to the FreeBSD/JDK project, which should help
us 'bootstrap' a native build for FreeBSD.



Nate


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


Delivered-To: freebsd-java@freebsd.org
Received: from ntua.gr (achilles.noc.ntua.gr [147.102.222.210])
	by hub.freebsd.org (Postfix) with ESMTP id 545ED37B400
	for <freebsd-java@FreeBSD.ORG>; Fri,  1 Dec 2000 03:19:52 -0800 (PST)
Received: from netmode.ntua.gr (dolly.netmode.ece.ntua.gr [147.102.13.10])
	by ntua.gr (8.9.3/8.9.3) with ESMTP id NAA21391;
	Fri, 1 Dec 2000 13:19:50 +0200 (EET)
Received: (from past@localhost)
	by netmode.ntua.gr (8.11.1/8.11.1) id eB1BRAB17490;
	Fri, 1 Dec 2000 13:27:10 +0200 (EET)
	(envelope-from past)
Date: Fri, 1 Dec 2000 13:27:10 +0200
From: Panagiotis Astithas <past@netmode.ntua.gr>
To: Joe Shevland <shevlandj@kpi.com.au>
Cc: Ernst de Haan <ernst@jollem.com>,
	FreeBSD Java mailing list <freebsd-java@FreeBSD.ORG>
Subject: Re: Performance hint for JDK on FreeBSD
Message-ID: <20001201132710.A16854@netmode.ece.ntua.gr>
Reply-To: past@netmode.ntua.gr
References: <20001201005450.A27077@c187104187.telekabel.chello.nl> \
                <IOEALGALKLLJILALBBOMAENFCFAA.shevlandj@kpi.com.au>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <IOEALGALKLLJILALBBOMAENFCFAA.shevlandj@kpi.com.au>; from \
                shevlandj@kpi.com.au on Fri, Dec 01, 2000 at 11:00:26AM +1100
X-Organizational-Unit: Network Management and Optimal Design Laboratory
X-Organization: National Technical University of Athens, GREECE
X-Work-Phone: +30-1-772-1-450
X-Work-FAX: +30-1-772-1-452
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

On Fri, Dec 01, 2000 at 11:00:26AM +1100, Joe Shevland wrote:
> I'm not actually seeing these 'Font not found' messages; is this only if you're \
> running under X (no X on my box)?

Me neither. IIRC Greg fixed those a few versions ago. Or perhaps I
somehow managed to get those fonts? I have X 4.0.1, URW fonts and a
few TrueType fonts I came across.

-past


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


Delivered-To: freebsd-java@freebsd.org
Received: from hermes.research.kpn.com (hermes.research.kpn.com [139.63.192.8])
	by hub.freebsd.org (Postfix) with ESMTP id 94D7137B400
	for <freebsd-java@FreeBSD.ORG>; Fri,  1 Dec 2000 04:12:12 -0800 (PST)
Received: from l04.research.kpn.com (l04.research.kpn.com [139.63.192.204])
 by research.kpn.com (PMDF V5.2-31 #42699)
 with ESMTP id <01JX6W6WJO420012ZJ@research.kpn.com> for
 freebsd-java@FreeBSD.ORG; Fri, 1 Dec 2000 13:12:11 +0100
Received: by l04.research.kpn.com with Internet Mail Service (5.5.2650.21)
	id <XGRLMYK5>; Fri, 01 Dec 2000 13:12:10 +0100
Content-return: allowed
Date: Fri, 01 Dec 2000 13:12:03 +0100
From: "Koster, K.J." <K.J.Koster@kpn.com>
Subject: RE: Performance hint for JDK on FreeBSD
To: FreeBSD Java mailing list <freebsd-java@FreeBSD.ORG>
Message-id: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com>
MIME-version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-type: text/plain;	charset="iso-8859-1"
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

> 
> > I'm not actually seeing these 'Font not found' messages; is
> this only if you're running under X (no X on my box)?
> 
The font errors are Swing-related, so non-Swing applications won't produce
them. (Dunno about AWT).

> 
> Me neither. IIRC Greg fixed those a few versions ago. Or perhaps I
> somehow managed to get those fonts? I have X 4.0.1, URW fonts and a
> few TrueType fonts I came across.
> 
A fix is described on my web site:
http://www.kjkoster.org/java/index.jsp?page=content/howto.jsp&id=hd06

I never knew that it is a 400% performance boost, which does sound a little
strange. I'm really curious why that is.

    Kees Jan

=============================================== You are only young once,
       but you can stay immature all your life.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


Delivered-To: freebsd-java@freebsd.org
Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187])
	by hub.freebsd.org (Postfix) with ESMTP id 516E637B400
	for <freebsd-java@freebsd.org>; Fri,  1 Dec 2000 08:55:12 -0800 (PST)
Received: (from ernst@localhost)
	by heinz.jollem.com (8.11.1/8.9.3) id eB1GnNh57601;
	Fri, 1 Dec 2000 17:49:23 +0100 (CET)
	(envelope-from ernst)
Date: Fri, 1 Dec 2000 17:49:23 +0100
From: Ernst de Haan <ernst@jollem.com>
To: "Koster, K.J." <K.J.Koster@kpn.com>
Cc: FreeBSD Java mailing list <freebsd-java@freebsd.org>
Subject: Re: Performance hint for JDK on FreeBSD
Message-ID: <20001201174923.A57144@c187104187.telekabel.chello.nl>
References: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com>; from \
                K.J.Koster@kpn.com on Fri, Dec 01, 2000 at 01:12:03PM +0100
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

Hallo Kees-Jan! ;)

> A fix is described on my web site:
> http://www.kjkoster.org/java/index.jsp?page=content/howto.jsp&id=hd06

Thanks, I used to have the URW fonts installed when I ran XFree86 3.3.x, but
now I'm on 4.0.1f.

Only comment I have is that the fonts seem a little largish, can I compensate
for that somehow?

> I never knew that it is a 400% performance boost, which does sound a little
> strange. I'm really curious why that is.

Well, I turned on profiling, and found that most of the time is spent in X11
specific Java code. I will re-run the tests after I temporarily disabled your
suggested modifications.


Ernst


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


Delivered-To: freebsd-java@freebsd.org
Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187])
	by hub.freebsd.org (Postfix) with ESMTP id BC9BA37B400
	for <freebsd-java@freebsd.org>; Fri,  1 Dec 2000 09:51:20 -0800 (PST)
Received: (from ernst@localhost)
	by heinz.jollem.com (8.11.1/8.9.3) id eB1HoVG59088;
	Fri, 1 Dec 2000 18:50:31 +0100 (CET)
	(envelope-from ernst)
Date: Fri, 1 Dec 2000 18:50:31 +0100
From: Ernst de Haan <ernst@jollem.com>
To: "Koster, K.J." <K.J.Koster@kpn.com>
Cc: FreeBSD Java mailing list <freebsd-java@freebsd.org>
Subject: Re: Performance hint for JDK on FreeBSD
Message-ID: <20001201185031.A58178@c187104187.telekabel.chello.nl>
References: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com> \
                <20001201174923.A57144@c187104187.telekabel.chello.nl>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <20001201174923.A57144@c187104187.telekabel.chello.nl>; from \
                ernst@jollem.com on Fri, Dec 01, 2000 at 05:49:23PM +0100
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

Heya Kees-Jan and all,


> > I never knew that it is a 400% performance boost, which does sound a little
> > strange. I'm really curious why that is.
> 
> Well, I turned on profiling, and found that most of the time is spent in X11
> specific Java code. I will re-run the tests after I temporarily disabled your
> suggested modifications.

Okay, I did a little profiling (using -Xrunhprof:cpu=times). This is the top
10 when I dont have the modified font.properties file:

   CPU TIME (ms) BEGIN (total = 29358) Fri Dec  1 17:55:12 2000
   rank   self  accum   count trace method
      1 24.71% 24.71%  253952  1304 sun/io/CharToByteSingleByte.getNative
      2 16.04% 40.76%    8188  1399 sun/io/CharToByteSingleByte.convert
      3 12.93% 53.69%  253952   182 java/lang/String.charAt
      4  2.25% 55.94%    8184   620 java/lang/Throwable.fillInStackTrace
      5  1.44% 57.38%    8258   938 java/lang/String.<init>
      6  1.33% 58.71%       1  1275 sun/awt/font/NativeFontWrapper.registerFonts
      7  1.21% 59.93%    8184   867 java/lang/Throwable.<init>
      8  1.08% 61.01%   10958   153 java/io/StreamTokenizer.read
      9  1.07% 62.08%   10958   623 java/io/BufferedInputStream.read
     10  0.91% 62.99%     318   123 java/util/Properties.loadConvert

The traces for the top 3 are:

   TRACE 1304:
      sun/io/CharToByteSingleByte.getNative
      sun/io/CharToByteSingleByte.convert
      sun/awt/font/NativeFontWrapper.registerFonts
      sun/awt/X11GraphicsEnvironment.registerNativeFonts

   TRACE 1399:
      sun/io/CharToByteSingleByte.convert
      sun/awt/font/NativeFontWrapper.registerFonts
      sun/awt/X11GraphicsEnvironment.registerNativeFonts
      sun/java2d/SunGraphicsEnvironment$2.run

   TRACE 182:
      java/lang/String.charAt
      sun/io/CharToByteSingleByte.getNative
      sun/io/CharToByteSingleByte.convert
      sun/awt/font/NativeFontWrapper.registerFonts

Here are the startup times for AWT:

          Original:         w/modifications:
          ----------------  ------------------------------
   run 1: 2607 ms           608 ms
   run 2: 2579 ms           573 ms
   run 3: 2583 ms           601 ms
   run 4: 2713 ms           599 ms

Note: The only modifications performed are adding the URW fonts to my
XF86Config and using the font.properties from Kees-Jan's site instead of the
original one!

Here is the top 10 of CPU time eaters for my application with the
modifications applied:

   CPU TIME (ms) BEGIN (total = 9169) Fri Dec  1 17:46:56 2000
   rank   self  accum   count trace method
      1  2.91%  2.91%     318   110 java/util/Properties.loadConvert
      2  2.75%  5.66%     252   109 java/util/Properties.loadConvert
      3  2.25%  7.91%       5   158 java/util/Properties.load
      4  1.98%  9.89%    6356   987 java/lang/String.indexOf
      5  1.73% 11.63%    5479   584 java/io/BufferedInputStream.read
      6  1.73% 13.36%    5479   142 java/io/StreamTokenizer.read
      7  1.49% 14.85%    8590   203 java/lang/StringBuffer.append
      8  1.42% 16.27%    8590   675 java/lang/String.charAt
      9  1.41% 17.68%    8133   946 java/lang/StringBuffer.append
     10  1.36% 19.04%    8133   207 java/lang/String.charAt

Now all of a sudden my application code comes on top. And that's the way I
like it! :)

IMHO these results are quite amazing!

Next thing I'll do is write a small program that will do nothing but starting
AWT and displaying the startup times, as the current results are obtained by
looking at the log output of my own Swing application.


Ernst


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


Delivered-To: freebsd-java@freebsd.org
Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187])
	by hub.freebsd.org (Postfix) with ESMTP id B42BD37B401
	for <freebsd-java@freebsd.org>; Fri,  1 Dec 2000 10:09:17 -0800 (PST)
Received: (from ernst@localhost)
	by heinz.jollem.com (8.11.1/8.9.3) id eB1I8Rn59521;
	Fri, 1 Dec 2000 19:08:27 +0100 (CET)
	(envelope-from ernst)
Date: Fri, 1 Dec 2000 19:08:27 +0100
From: Ernst de Haan <ernst@jollem.com>
To: "Koster, K.J." <K.J.Koster@kpn.com>
Cc: FreeBSD Java mailing list <freebsd-java@freebsd.org>
Subject: Re: Performance hint for JDK on FreeBSD
Message-ID: <20001201190827.A59487@c187104187.telekabel.chello.nl>
References: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com> \
<20001201174923.A57144@c187104187.telekabel.chello.nl> \
                <20001201185031.A58178@c187104187.telekabel.chello.nl>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="PNTmBPCT7hxwcZjr"
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <20001201185031.A58178@c187104187.telekabel.chello.nl>; from \
                ernst@jollem.com on Fri, Dec 01, 2000 at 06:50:31PM +0100
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org



Ok, the votes are counted, the results are in :) I've written a small Java
program I wrote to produce new test results that should be reproducable on
other (FreeBSD) systems too. I've included the .java file in an attachment,
and, for your convenience, the AWTTest.class file.

In the program I do 2 things. First I attempt to load the class
java.awt.Toolkit. Then I invoke the class function getDefaultToolkit(), which
apparently initializes AWT.

Here are the results (I did only one run):

                Original   Applied suggested modifications
                --------   -------------------------------
Class load:     155 ms.    154 ms.
AWT startup:    2454 ms.   437 ms.

That's quite a difference, isn't it? :) Could anyone confirm these results for
his/her system?


Ernst


Ernst de Haan wrote:
> Heya Kees-Jan and all,
> 
> 
> > > I never knew that it is a 400% performance boost, which does sound a little
> > > strange. I'm really curious why that is.
> > 
> > Well, I turned on profiling, and found that most of the time is spent in X11
> > specific Java code. I will re-run the tests after I temporarily disabled your
> > suggested modifications.
> 
> Okay, I did a little profiling (using -Xrunhprof:cpu=times). This is the top
> 10 when I dont have the modified font.properties file:
> 
>    CPU TIME (ms) BEGIN (total = 29358) Fri Dec  1 17:55:12 2000
>    rank   self  accum   count trace method
>       1 24.71% 24.71%  253952  1304 sun/io/CharToByteSingleByte.getNative
>       2 16.04% 40.76%    8188  1399 sun/io/CharToByteSingleByte.convert
>       3 12.93% 53.69%  253952   182 java/lang/String.charAt
>       4  2.25% 55.94%    8184   620 java/lang/Throwable.fillInStackTrace
>       5  1.44% 57.38%    8258   938 java/lang/String.<init>
>       6  1.33% 58.71%       1  1275 sun/awt/font/NativeFontWrapper.registerFonts
>       7  1.21% 59.93%    8184   867 java/lang/Throwable.<init>
>       8  1.08% 61.01%   10958   153 java/io/StreamTokenizer.read
>       9  1.07% 62.08%   10958   623 java/io/BufferedInputStream.read
>      10  0.91% 62.99%     318   123 java/util/Properties.loadConvert
> 
> The traces for the top 3 are:
> 
>    TRACE 1304:
>       sun/io/CharToByteSingleByte.getNative
>       sun/io/CharToByteSingleByte.convert
>       sun/awt/font/NativeFontWrapper.registerFonts
>       sun/awt/X11GraphicsEnvironment.registerNativeFonts
> 
>    TRACE 1399:
>       sun/io/CharToByteSingleByte.convert
>       sun/awt/font/NativeFontWrapper.registerFonts
>       sun/awt/X11GraphicsEnvironment.registerNativeFonts
>       sun/java2d/SunGraphicsEnvironment$2.run
> 
>    TRACE 182:
>       java/lang/String.charAt
>       sun/io/CharToByteSingleByte.getNative
>       sun/io/CharToByteSingleByte.convert
>       sun/awt/font/NativeFontWrapper.registerFonts
> 
> Here are the startup times for AWT:
> 
>           Original:         w/modifications:
>           ----------------  ------------------------------
>    run 1: 2607 ms           608 ms
>    run 2: 2579 ms           573 ms
>    run 3: 2583 ms           601 ms
>    run 4: 2713 ms           599 ms
> 
> Note: The only modifications performed are adding the URW fonts to my
> XF86Config and using the font.properties from Kees-Jan's site instead of the
> original one!
> 
> Here is the top 10 of CPU time eaters for my application with the
> modifications applied:
> 
>    CPU TIME (ms) BEGIN (total = 9169) Fri Dec  1 17:46:56 2000
>    rank   self  accum   count trace method
>       1  2.91%  2.91%     318   110 java/util/Properties.loadConvert
>       2  2.75%  5.66%     252   109 java/util/Properties.loadConvert
>       3  2.25%  7.91%       5   158 java/util/Properties.load
>       4  1.98%  9.89%    6356   987 java/lang/String.indexOf
>       5  1.73% 11.63%    5479   584 java/io/BufferedInputStream.read
>       6  1.73% 13.36%    5479   142 java/io/StreamTokenizer.read
>       7  1.49% 14.85%    8590   203 java/lang/StringBuffer.append
>       8  1.42% 16.27%    8590   675 java/lang/String.charAt
>       9  1.41% 17.68%    8133   946 java/lang/StringBuffer.append
>      10  1.36% 19.04%    8133   207 java/lang/String.charAt
> 
> Now all of a sudden my application code comes on top. And that's the way I
> like it! :)
> 
> IMHO these results are quite amazing!
> 
> Next thing I'll do is write a small program that will do nothing but starting
> AWT and displaying the startup times, as the current results are obtained by
> looking at the log output of my own Swing application.
> 
> 
> Ernst
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-java" in the body of the message
> 

["AWTTest.java" (text/plain)]

public class AWTTest {

   public static void main(String[] args) throws Exception {

      // Load the Toolkit class from the AWT package
      long beforeClassLoad = System.currentTimeMillis();
      Class c = Class.forName("java.awt.Toolkit");
      long afterClassLoad = System.currentTimeMillis();

      // Get the getDefaultToolkit() class function
      java.lang.reflect.Method m = c.getMethod("getDefaultToolkit", null);

      // Invoke the class function
      long beforeInvoke = System.currentTimeMillis();
      m.invoke(null, null);
      long afterInvoke = System.currentTimeMillis();

      long t1 = afterClassLoad - beforeClassLoad;
      long t2 = afterInvoke    - beforeInvoke;

      System.out.println("Class load took:  " + t1 + " ms.");
      System.out.println("AWT startup took: " + t2 + " ms.");
      System.exit(0);
   }
}

["AWTTest.class" (application/octet-stream)]
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message

Delivered-To: freebsd-java@freebsd.org
Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66])
	by hub.freebsd.org (Postfix) with ESMTP id 58B3937B400
	for <freebsd-java@FreeBSD.ORG>; Fri,  1 Dec 2000 10:12:17 -0800 (PST)
Received: from nomad.yogotech.com (nomad.yogotech.com [206.127.123.131])
	by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id LAA11169;
	Fri, 1 Dec 2000 11:12:12 -0700 (MST)
	(envelope-from nate@nomad.yogotech.com)
Received: (from nate@localhost)
	by nomad.yogotech.com (8.8.8/8.8.8) id LAA05856;
	Fri, 1 Dec 2000 11:12:11 -0700 (MST)
	(envelope-from nate)
From: Nate Williams <nate@yogotech.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <14887.59899.440931.811907@nomad.yogotech.com>
Date: Fri, 1 Dec 2000 11:12:11 -0700 (MST)
To: Ernst de Haan <ernst@jollem.com>
Cc: "Koster, K.J." <K.J.Koster@kpn.com>,
	FreeBSD Java mailing list <freebsd-java@FreeBSD.ORG>
Subject: Re: Performance hint for JDK on FreeBSD
In-Reply-To: <20001201190827.A59487@c187104187.telekabel.chello.nl>
References: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com>
	<20001201174923.A57144@c187104187.telekabel.chello.nl>
	<20001201185031.A58178@c187104187.telekabel.chello.nl>
	<20001201190827.A59487@c187104187.telekabel.chello.nl>
X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid
Reply-To: nate@yogotech.com (Nate Williams)
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

> Ok, the votes are counted, the results are in :) I've written a small Java
> program I wrote to produce new test results that should be reproducable on
> other (FreeBSD) systems too. I've included the .java file in an attachment,
> and, for your convenience, the AWTTest.class file.

For those of us who are absolutely paranoid, can you send the original
.java file?  I *hate* running binaries on my system that I know nothing
about.  (No offense, to Ernst in implying that he's trying to breakin).

Also, having the source allows it to be used for profiling when we do
additional ports and such.

Thanks!


Nate

> Ernst de Haan wrote:
> > Heya Kees-Jan and all,
> > 
> > 
> > > > I never knew that it is a 400% performance boost, which does sound a little
> > > > strange. I'm really curious why that is.
> > > 
> > > Well, I turned on profiling, and found that most of the time is spent in X11
> > > specific Java code. I will re-run the tests after I temporarily disabled your
> > > suggested modifications.
> > 
> > Okay, I did a little profiling (using -Xrunhprof:cpu=times). This is the top
> > 10 when I dont have the modified font.properties file:
> > 
> > CPU TIME (ms) BEGIN (total = 29358) Fri Dec  1 17:55:12 2000
> > rank   self  accum   count trace method
> > 1 24.71% 24.71%  253952  1304 sun/io/CharToByteSingleByte.getNative
> > 2 16.04% 40.76%    8188  1399 sun/io/CharToByteSingleByte.convert
> > 3 12.93% 53.69%  253952   182 java/lang/String.charAt
> > 4  2.25% 55.94%    8184   620 java/lang/Throwable.fillInStackTrace
> > 5  1.44% 57.38%    8258   938 java/lang/String.<init>
> > 6  1.33% 58.71%       1  1275 sun/awt/font/NativeFontWrapper.registerFonts
> > 7  1.21% 59.93%    8184   867 java/lang/Throwable.<init>
> > 8  1.08% 61.01%   10958   153 java/io/StreamTokenizer.read
> > 9  1.07% 62.08%   10958   623 java/io/BufferedInputStream.read
> > 10  0.91% 62.99%     318   123 java/util/Properties.loadConvert
> > 
> > The traces for the top 3 are:
> > 
> > TRACE 1304:
> > sun/io/CharToByteSingleByte.getNative
> > sun/io/CharToByteSingleByte.convert
> > sun/awt/font/NativeFontWrapper.registerFonts
> > sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > 
> > TRACE 1399:
> > sun/io/CharToByteSingleByte.convert
> > sun/awt/font/NativeFontWrapper.registerFonts
> > sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > sun/java2d/SunGraphicsEnvironment$2.run
> > 
> > TRACE 182:
> > java/lang/String.charAt
> > sun/io/CharToByteSingleByte.getNative
> > sun/io/CharToByteSingleByte.convert
> > sun/awt/font/NativeFontWrapper.registerFonts
> > 
> > Here are the startup times for AWT:
> > 
> > Original:         w/modifications:
> > ----------------  ------------------------------
> > run 1: 2607 ms           608 ms
> > run 2: 2579 ms           573 ms
> > run 3: 2583 ms           601 ms
> > run 4: 2713 ms           599 ms
> > 
> > Note: The only modifications performed are adding the URW fonts to my
> > XF86Config and using the font.properties from Kees-Jan's site instead of the
> > original one!
> > 
> > Here is the top 10 of CPU time eaters for my application with the
> > modifications applied:
> > 
> > CPU TIME (ms) BEGIN (total = 9169) Fri Dec  1 17:46:56 2000
> > rank   self  accum   count trace method
> > 1  2.91%  2.91%     318   110 java/util/Properties.loadConvert
> > 2  2.75%  5.66%     252   109 java/util/Properties.loadConvert
> > 3  2.25%  7.91%       5   158 java/util/Properties.load
> > 4  1.98%  9.89%    6356   987 java/lang/String.indexOf
> > 5  1.73% 11.63%    5479   584 java/io/BufferedInputStream.read
> > 6  1.73% 13.36%    5479   142 java/io/StreamTokenizer.read
> > 7  1.49% 14.85%    8590   203 java/lang/StringBuffer.append
> > 8  1.42% 16.27%    8590   675 java/lang/String.charAt
> > 9  1.41% 17.68%    8133   946 java/lang/StringBuffer.append
> > 10  1.36% 19.04%    8133   207 java/lang/String.charAt
> > 
> > Now all of a sudden my application code comes on top. And that's the way I
> > like it! :)
> > 
> > IMHO these results are quite amazing!
> > 
> > Next thing I'll do is write a small program that will do nothing but starting
> > AWT and displaying the startup times, as the current results are obtained by
> > looking at the log output of my own Swing application.
> > 
> > 
> > Ernst
> > 
> > 
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-java" in the body of the message
> > 
> public class AWTTest {
> 
> public static void main(String[] args) throws Exception {
> 
> // Load the Toolkit class from the AWT package
> long beforeClassLoad = System.currentTimeMillis();
> Class c = Class.forName("java.awt.Toolkit");
> long afterClassLoad = System.currentTimeMillis();
> 
> // Get the getDefaultToolkit() class function
> java.lang.reflect.Method m = c.getMethod("getDefaultToolkit", null);
> 
> // Invoke the class function
> long beforeInvoke = System.currentTimeMillis();
> m.invoke(null, null);
> long afterInvoke = System.currentTimeMillis();
> 
> long t1 = afterClassLoad - beforeClassLoad;
> long t2 = afterInvoke    - beforeInvoke;
> 
> System.out.println("Class load took:  " + t1 + " ms.");
> System.out.println("AWT startup took: " + t2 + " ms.");
> System.exit(0);
> }
> }


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


Delivered-To: freebsd-java@freebsd.org
Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187])
	by hub.freebsd.org (Postfix) with ESMTP id 6D2CC37B400
	for <freebsd-java@freebsd.org>; Fri,  1 Dec 2000 10:24:35 -0800 (PST)
Received: (from ernst@localhost)
	by heinz.jollem.com (8.11.1/8.9.3) id eB1INDb59634;
	Fri, 1 Dec 2000 19:23:13 +0100 (CET)
	(envelope-from ernst)
Date: Fri, 1 Dec 2000 19:23:13 +0100
From: Ernst de Haan <ernst@jollem.com>
To: Nate Williams <nate@yogotech.com>
Cc: FreeBSD Java mailing list <freebsd-java@freebsd.org>
Subject: Re: Performance hint for JDK on FreeBSD
Message-ID: <20001201192313.A59625@c187104187.telekabel.chello.nl>
References: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com> \
<20001201174923.A57144@c187104187.telekabel.chello.nl> \
<20001201185031.A58178@c187104187.telekabel.chello.nl> \
<20001201190827.A59487@c187104187.telekabel.chello.nl> \
                <14887.59899.440931.811907@nomad.yogotech.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <14887.59899.440931.811907@nomad.yogotech.com>; from nate@yogotech.com \
                on Fri, Dec 01, 2000 at 11:12:11AM -0700
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

Look twice, it's there :)

Nate Williams wrote:
> > Ok, the votes are counted, the results are in :) I've written a small Java
> > program I wrote to produce new test results that should be reproducable on
> > other (FreeBSD) systems too. I've included the .java file in an attachment,
> > and, for your convenience, the AWTTest.class file.
> 
> For those of us who are absolutely paranoid, can you send the original
> .java file?  I *hate* running binaries on my system that I know nothing
> about.  (No offense, to Ernst in implying that he's trying to breakin).
> 
> Also, having the source allows it to be used for profiling when we do
> additional ports and such.
> 
> Thanks!
> 
> 
> Nate
> 
> > Ernst de Haan wrote:
> > > Heya Kees-Jan and all,
> > > 
> > > 
> > > > > I never knew that it is a 400% performance boost, which does sound a little
> > > > > strange. I'm really curious why that is.
> > > > 
> > > > Well, I turned on profiling, and found that most of the time is spent in X11
> > > > specific Java code. I will re-run the tests after I temporarily disabled your
> > > > suggested modifications.
> > > 
> > > Okay, I did a little profiling (using -Xrunhprof:cpu=times). This is the top
> > > 10 when I dont have the modified font.properties file:
> > > 
> > > CPU TIME (ms) BEGIN (total = 29358) Fri Dec  1 17:55:12 2000
> > > rank   self  accum   count trace method
> > > 1 24.71% 24.71%  253952  1304 sun/io/CharToByteSingleByte.getNative
> > > 2 16.04% 40.76%    8188  1399 sun/io/CharToByteSingleByte.convert
> > > 3 12.93% 53.69%  253952   182 java/lang/String.charAt
> > > 4  2.25% 55.94%    8184   620 java/lang/Throwable.fillInStackTrace
> > > 5  1.44% 57.38%    8258   938 java/lang/String.<init>
> > > 6  1.33% 58.71%       1  1275 sun/awt/font/NativeFontWrapper.registerFonts
> > > 7  1.21% 59.93%    8184   867 java/lang/Throwable.<init>
> > > 8  1.08% 61.01%   10958   153 java/io/StreamTokenizer.read
> > > 9  1.07% 62.08%   10958   623 java/io/BufferedInputStream.read
> > > 10  0.91% 62.99%     318   123 java/util/Properties.loadConvert
> > > 
> > > The traces for the top 3 are:
> > > 
> > > TRACE 1304:
> > > sun/io/CharToByteSingleByte.getNative
> > > sun/io/CharToByteSingleByte.convert
> > > sun/awt/font/NativeFontWrapper.registerFonts
> > > sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > > 
> > > TRACE 1399:
> > > sun/io/CharToByteSingleByte.convert
> > > sun/awt/font/NativeFontWrapper.registerFonts
> > > sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > > sun/java2d/SunGraphicsEnvironment$2.run
> > > 
> > > TRACE 182:
> > > java/lang/String.charAt
> > > sun/io/CharToByteSingleByte.getNative
> > > sun/io/CharToByteSingleByte.convert
> > > sun/awt/font/NativeFontWrapper.registerFonts
> > > 
> > > Here are the startup times for AWT:
> > > 
> > > Original:         w/modifications:
> > > ----------------  ------------------------------
> > > run 1: 2607 ms           608 ms
> > > run 2: 2579 ms           573 ms
> > > run 3: 2583 ms           601 ms
> > > run 4: 2713 ms           599 ms
> > > 
> > > Note: The only modifications performed are adding the URW fonts to my
> > > XF86Config and using the font.properties from Kees-Jan's site instead of the
> > > original one!
> > > 
> > > Here is the top 10 of CPU time eaters for my application with the
> > > modifications applied:
> > > 
> > > CPU TIME (ms) BEGIN (total = 9169) Fri Dec  1 17:46:56 2000
> > > rank   self  accum   count trace method
> > > 1  2.91%  2.91%     318   110 java/util/Properties.loadConvert
> > > 2  2.75%  5.66%     252   109 java/util/Properties.loadConvert
> > > 3  2.25%  7.91%       5   158 java/util/Properties.load
> > > 4  1.98%  9.89%    6356   987 java/lang/String.indexOf
> > > 5  1.73% 11.63%    5479   584 java/io/BufferedInputStream.read
> > > 6  1.73% 13.36%    5479   142 java/io/StreamTokenizer.read
> > > 7  1.49% 14.85%    8590   203 java/lang/StringBuffer.append
> > > 8  1.42% 16.27%    8590   675 java/lang/String.charAt
> > > 9  1.41% 17.68%    8133   946 java/lang/StringBuffer.append
> > > 10  1.36% 19.04%    8133   207 java/lang/String.charAt
> > > 
> > > Now all of a sudden my application code comes on top. And that's the way I
> > > like it! :)
> > > 
> > > IMHO these results are quite amazing!
> > > 
> > > Next thing I'll do is write a small program that will do nothing but starting
> > > AWT and displaying the startup times, as the current results are obtained by
> > > looking at the log output of my own Swing application.
> > > 
> > > 
> > > Ernst
> > > 
> > > 
> > > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > > with "unsubscribe freebsd-java" in the body of the message
> > > 
> > public class AWTTest {
> > 
> > public static void main(String[] args) throws Exception {
> > 
> > // Load the Toolkit class from the AWT package
> > long beforeClassLoad = System.currentTimeMillis();
> > Class c = Class.forName("java.awt.Toolkit");
> > long afterClassLoad = System.currentTimeMillis();
> > 
> > // Get the getDefaultToolkit() class function
> > java.lang.reflect.Method m = c.getMethod("getDefaultToolkit", null);
> > 
> > // Invoke the class function
> > long beforeInvoke = System.currentTimeMillis();
> > m.invoke(null, null);
> > long afterInvoke = System.currentTimeMillis();
> > 
> > long t1 = afterClassLoad - beforeClassLoad;
> > long t2 = afterInvoke    - beforeInvoke;
> > 
> > System.out.println("Class load took:  " + t1 + " ms.");
> > System.out.println("AWT startup took: " + t2 + " ms.");
> > System.exit(0);
> > }
> > }
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


Delivered-To: freebsd-java@freebsd.org
Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66])
	by hub.freebsd.org (Postfix) with ESMTP id BF94837B400
	for <freebsd-java@FreeBSD.ORG>; Fri,  1 Dec 2000 12:05:56 -0800 (PST)
Received: from nomad.yogotech.com (nomad.yogotech.com [206.127.123.131])
	by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id NAA13024;
	Fri, 1 Dec 2000 13:05:49 -0700 (MST)
	(envelope-from nate@nomad.yogotech.com)
Received: (from nate@localhost)
	by nomad.yogotech.com (8.8.8/8.8.8) id NAA06505;
	Fri, 1 Dec 2000 13:05:48 -0700 (MST)
	(envelope-from nate)
From: Nate Williams <nate@yogotech.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <14888.1179.861868.150322@nomad.yogotech.com>
Date: Fri, 1 Dec 2000 13:05:47 -0700 (MST)
To: Ernst de Haan <ernst@jollem.com>
Cc: "Koster, K.J." <K.J.Koster@kpn.com>,
	FreeBSD Java mailing list <freebsd-java@FreeBSD.ORG>
Subject: Re: Performance hint for JDK on FreeBSD
In-Reply-To: <20001201190827.A59487@c187104187.telekabel.chello.nl>
References: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com>
	<20001201174923.A57144@c187104187.telekabel.chello.nl>
	<20001201185031.A58178@c187104187.telekabel.chello.nl>
	<20001201190827.A59487@c187104187.telekabel.chello.nl>
X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid
Reply-To: nate@yogotech.com (Nate Williams)
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

> Ok, the votes are counted, the results are in :) I've written a small Java
> program I wrote to produce new test results that should be reproducable on
> other (FreeBSD) systems too. I've included the .java file in an attachment,
> and, for your convenience, the AWTTest.class file.
> 

Question:  Are you running this program on your 'local' client (with the
DISPLAY environment variable set to :0)?  If not, the AWT startup will
be greatly effected, since AWT startup does some X stuff behind the
scenes, which may take longer if it involves network traffic.

> In the program I do 2 things. First I attempt to load the class
> java.awt.Toolkit. Then I invoke the class function getDefaultToolkit(), which
> apparently initializes AWT.
> 
> Here are the results (I did only one run):
> 
> Original   Applied suggested modifications
> --------   -------------------------------
> Class load:     155 ms.    154 ms.
> AWT startup:    2454 ms.   437 ms.
> 
> That's quite a difference, isn't it? :) Could anyone confirm these
> results for his/her system?

Running JDK1.1.8 on my box I get:
nomad:~/roof/dpr/src/dpr % java AWTTest
Class load took:  8 ms.
AWT startup took: 24 ms.

Pretty darn quickly, but it's a fairly speedy box.  I won't post the
Alpha numbers because I'm doing all the X stuff remotely.


Nate

> Ernst de Haan wrote:
> > Heya Kees-Jan and all,
> > 
> > 
> > > > I never knew that it is a 400% performance boost, which does sound a little
> > > > strange. I'm really curious why that is.
> > > 
> > > Well, I turned on profiling, and found that most of the time is spent in X11
> > > specific Java code. I will re-run the tests after I temporarily disabled your
> > > suggested modifications.
> > 
> > Okay, I did a little profiling (using -Xrunhprof:cpu=times). This is the top
> > 10 when I dont have the modified font.properties file:
> > 
> > CPU TIME (ms) BEGIN (total = 29358) Fri Dec  1 17:55:12 2000
> > rank   self  accum   count trace method
> > 1 24.71% 24.71%  253952  1304 sun/io/CharToByteSingleByte.getNative
> > 2 16.04% 40.76%    8188  1399 sun/io/CharToByteSingleByte.convert
> > 3 12.93% 53.69%  253952   182 java/lang/String.charAt
> > 4  2.25% 55.94%    8184   620 java/lang/Throwable.fillInStackTrace
> > 5  1.44% 57.38%    8258   938 java/lang/String.<init>
> > 6  1.33% 58.71%       1  1275 sun/awt/font/NativeFontWrapper.registerFonts
> > 7  1.21% 59.93%    8184   867 java/lang/Throwable.<init>
> > 8  1.08% 61.01%   10958   153 java/io/StreamTokenizer.read
> > 9  1.07% 62.08%   10958   623 java/io/BufferedInputStream.read
> > 10  0.91% 62.99%     318   123 java/util/Properties.loadConvert
> > 
> > The traces for the top 3 are:
> > 
> > TRACE 1304:
> > sun/io/CharToByteSingleByte.getNative
> > sun/io/CharToByteSingleByte.convert
> > sun/awt/font/NativeFontWrapper.registerFonts
> > sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > 
> > TRACE 1399:
> > sun/io/CharToByteSingleByte.convert
> > sun/awt/font/NativeFontWrapper.registerFonts
> > sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > sun/java2d/SunGraphicsEnvironment$2.run
> > 
> > TRACE 182:
> > java/lang/String.charAt
> > sun/io/CharToByteSingleByte.getNative
> > sun/io/CharToByteSingleByte.convert
> > sun/awt/font/NativeFontWrapper.registerFonts
> > 
> > Here are the startup times for AWT:
> > 
> > Original:         w/modifications:
> > ----------------  ------------------------------
> > run 1: 2607 ms           608 ms
> > run 2: 2579 ms           573 ms
> > run 3: 2583 ms           601 ms
> > run 4: 2713 ms           599 ms
> > 
> > Note: The only modifications performed are adding the URW fonts to my
> > XF86Config and using the font.properties from Kees-Jan's site instead of the
> > original one!
> > 
> > Here is the top 10 of CPU time eaters for my application with the
> > modifications applied:
> > 
> > CPU TIME (ms) BEGIN (total = 9169) Fri Dec  1 17:46:56 2000
> > rank   self  accum   count trace method
> > 1  2.91%  2.91%     318   110 java/util/Properties.loadConvert
> > 2  2.75%  5.66%     252   109 java/util/Properties.loadConvert
> > 3  2.25%  7.91%       5   158 java/util/Properties.load
> > 4  1.98%  9.89%    6356   987 java/lang/String.indexOf
> > 5  1.73% 11.63%    5479   584 java/io/BufferedInputStream.read
> > 6  1.73% 13.36%    5479   142 java/io/StreamTokenizer.read
> > 7  1.49% 14.85%    8590   203 java/lang/StringBuffer.append
> > 8  1.42% 16.27%    8590   675 java/lang/String.charAt
> > 9  1.41% 17.68%    8133   946 java/lang/StringBuffer.append
> > 10  1.36% 19.04%    8133   207 java/lang/String.charAt
> > 
> > Now all of a sudden my application code comes on top. And that's the way I
> > like it! :)
> > 
> > IMHO these results are quite amazing!
> > 
> > Next thing I'll do is write a small program that will do nothing but starting
> > AWT and displaying the startup times, as the current results are obtained by
> > looking at the log output of my own Swing application.
> > 
> > 
> > Ernst
> > 
> > 
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-java" in the body of the message
> > 
> public class AWTTest {
> 
> public static void main(String[] args) throws Exception {
> 
> // Load the Toolkit class from the AWT package
> long beforeClassLoad = System.currentTimeMillis();
> Class c = Class.forName("java.awt.Toolkit");
> long afterClassLoad = System.currentTimeMillis();
> 
> // Get the getDefaultToolkit() class function
> java.lang.reflect.Method m = c.getMethod("getDefaultToolkit", null);
> 
> // Invoke the class function
> long beforeInvoke = System.currentTimeMillis();
> m.invoke(null, null);
> long afterInvoke = System.currentTimeMillis();
> 
> long t1 = afterClassLoad - beforeClassLoad;
> long t2 = afterInvoke    - beforeInvoke;
> 
> System.out.println("Class load took:  " + t1 + " ms.");
> System.out.println("AWT startup took: " + t2 + " ms.");
> System.exit(0);
> }
> }


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message


Delivered-To: freebsd-java@freebsd.org
Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187])
	by hub.freebsd.org (Postfix) with ESMTP id D688637B400
	for <freebsd-java@FreeBSD.ORG>; Fri,  1 Dec 2000 16:07:51 -0800 (PST)
Received: (from ernst@localhost)
	by heinz.jollem.com (8.11.1/8.9.3) id eB206xa61307;
	Sat, 2 Dec 2000 01:06:59 +0100 (CET)
	(envelope-from ernst)
Date: Sat, 2 Dec 2000 01:06:59 +0100
From: Ernst de Haan <ernst@jollem.com>
To: Nate Williams <nate@yogotech.com>
Cc: FreeBSD Java mailing list <freebsd-java@FreeBSD.ORG>
Subject: Re: Performance hint for JDK on FreeBSD
Message-ID: <20001202010659.A61295@c187104187.telekabel.chello.nl>
References: <59063B5B4D98D311BC0D0001FA7E4522026D7A7D@l04.research.kpn.com> \
<20001201174923.A57144@c187104187.telekabel.chello.nl> \
<20001201185031.A58178@c187104187.telekabel.chello.nl> \
<20001201190827.A59487@c187104187.telekabel.chello.nl> \
                <14888.1179.861868.150322@nomad.yogotech.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2i
In-Reply-To: <14888.1179.861868.150322@nomad.yogotech.com>; from nate@yogotech.com on \
                Fri, Dec 01, 2000 at 01:05:47PM -0700
Sender: owner-freebsd-java@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.org

Hi Nate,

Yes, I'm doing the tests locally on a P2-400 system, recent FreeBSD 4.2-S, 256
MB internal, XFree86 4.0.1f, FreeBSD JDK 1.2.2b10, no JIT.

Those numbers for JDK 1.1 are pretty nifty! Wow, I should test that too! Your
JDK 1.1 port seems very resource-effective!

Ernst


Nate Williams wrote:
> > Ok, the votes are counted, the results are in :) I've written a small Java
> > program I wrote to produce new test results that should be reproducable on
> > other (FreeBSD) systems too. I've included the .java file in an attachment,
> > and, for your convenience, the AWTTest.class file.
> > 
> 
> Question:  Are you running this program on your 'local' client (with the
> DISPLAY environment variable set to :0)?  If not, the AWT startup will
> be greatly effected, since AWT startup does some X stuff behind the
> scenes, which may take longer if it involves network traffic.
> 
> > In the program I do 2 things. First I attempt to load the class
> > java.awt.Toolkit. Then I invoke the class function getDefaultToolkit(), which
> > apparently initializes AWT.
> > 
> > Here are the results (I did only one run):
> > 
> > Original   Applied suggested modifications
> > --------   -------------------------------
> > Class load:     155 ms.    154 ms.
> > AWT startup:    2454 ms.   437 ms.
> > 
> > That's quite a difference, isn't it? :) Could anyone confirm these
> > results for his/her system?
> 
> Running JDK1.1.8 on my box I get:
> nomad:~/roof/dpr/src/dpr % java AWTTest
> Class load took:  8 ms.
> AWT startup took: 24 ms.
> 
> Pretty darn quickly, but it's a fairly speedy box.  I won't post the
> Alpha numbers because I'm doing all the X stuff remotely.
> 
> 
> Nate
> 
> > Ernst de Haan wrote:
> > > Heya Kees-Jan and all,
> > > 
> > > 
> > > > > I never knew that it is a 400% performance boost, which does sound a little
> > > > > strange. I'm really curious why that is.
> > > > 
> > > > Well, I turned on profiling, and found that most of the time is spent in X11
> > > > specific Java code. I will re-run the tests after I temporarily disabled your
> > > > suggested modifications.
> > > 
> > > Okay, I did a little profiling (using -Xrunhprof:cpu=times). This is the top
> > > 10 when I dont have the modified font.properties file:
> > > 
> > > CPU TIME (ms) BEGIN (total = 29358) Fri Dec  1 17:55:12 2000
> > > rank   self  accum   count trace method
> > > 1 24.71% 24.71%  253952  1304 sun/io/CharToByteSingleByte.getNative
> > > 2 16.04% 40.76%    8188  1399 sun/io/CharToByteSingleByte.convert
> > > 3 12.93% 53.69%  253952   182 java/lang/String.charAt
> > > 4  2.25% 55.94%    8184   620 java/lang/Throwable.fillInStackTrace
> > > 5  1.44% 57.38%    8258   938 java/lang/String.<init>
> > > 6  1.33% 58.71%       1  1275 sun/awt/font/NativeFontWrapper.registerFonts
> > > 7  1.21% 59.93%    8184   867 java/lang/Throwable.<init>
> > > 8  1.08% 61.01%   10958   153 java/io/StreamTokenizer.read
> > > 9  1.07% 62.08%   10958   623 java/io/BufferedInputStream.read
> > > 10  0.91% 62.99%     318   123 java/util/Properties.loadConvert
> > > 
> > > The traces for the top 3 are:
> > > 
> > > TRACE 1304:
> > > sun/io/CharToByteSingleByte.getNative
> > > sun/io/CharToByteSingleByte.convert
> > > sun/awt/font/NativeFontWrapper.registerFonts
> > > sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > > 
> > > TRACE 1399:
> > > sun/io/CharToByteSingleByte.convert
> > > sun/awt/font/NativeFontWrapper.registerFonts
> > > sun/awt/X11GraphicsEnvironment.registerNativeFonts
> > > sun/java2d/SunGraphicsEnvironment$2.run
> > > 
> > > TRACE 182:
> > > java/lang/String.charAt
> > > sun/io/CharToByteSingleByte.getNative
> > > sun/io/CharToByteSingleByte.convert
> > > sun/awt/font/NativeFontWrapper.registerFonts
> > > 
> > > Here are the startup times for AWT:
> > > 
> > > Original:         w/modifications:
> > > ----------------  ------------------------------
> > > run 1: 2607 ms           608 ms
> > > run 2: 2579 ms           573 ms
> > > run 3: 2583 ms           601 ms
> > > run 4: 2713 ms           599 ms
> > > 
> > > Note: The only modifications performed are adding the URW fonts to my
> > > XF86Config and using the font.properties from Kees-Jan's site instead of the
> > > original one!
> > > 
> > > Here is the top 10 of CPU time eaters for my application with the
> > > modifications applied:
> > > 
> > > CPU TIME (ms) BEGIN (total = 9169) Fri Dec  1 17:46:56 2000
> > > rank   self  accum   count trace method
> > > 1  2.91%  2.91%     318   110 java/util/Properties.loadConvert
> > > 2  2.75%  5.66%     252   109 java/util/Properties.loadConvert
> > > 3  2.25%  7.91%       5   158 java/util/Properties.load
> > > 4  1.98%  9.89%    6356   987 java/lang/String.indexOf
> > > 5  1.73% 11.63%    5479   584 java/io/BufferedInputStream.read
> > > 6  1.73% 13.36%    5479   142 java/io/StreamTokenizer.read
> > > 7  1.49% 14.85%    8590   203 java/lang/StringBuffer.append
> > > 8  1.42% 16.27%    8590   675 java/lang/String.charAt
> > > 9  1.41% 17.68%    8133   946 java/lang/StringBuffer.append
> > > 10  1.36% 19.04%    8133   207 java/lang/String.charAt
> > > 
> > > Now all of a sudden my application code comes on top. And that's the way I
> > > like it! :)
> > > 
> > > IMHO these results are quite amazing!
> > > 
> > > Next thing I'll do is write a small program that will do nothing but starting
> > > AWT and displaying the startup times, as the current results are obtained by
> > > looking at the log output of my own Swing application.
> > > 
> > > 
> > > Ernst
> > > 
> > > 
> > > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > > with "unsubscribe freebsd-java" in the body of the message
> > > 
> > public class AWTTest {
> > 
> > public static void main(String[] args) throws Exception {
> > 
> > // Load the Toolkit class from the AWT package
> > long beforeClassLoad = System.currentTimeMillis();
> > Class c = Class.forName("java.awt.Toolkit");
> > long afterClassLoad = System.currentTimeMillis();
> > 
> > // Get the getDefaultToolkit() class function
> > java.lang.reflect.Method m = c.getMethod("getDefaultToolkit", null);
> > 
> > // Invoke the class function
> > long beforeInvoke = System.currentTimeMillis();
> > m.invoke(null, null);
> > long afterInvoke = System.currentTimeMillis();
> > 
> > long t1 = afterClassLoad - beforeClassLoad;
> > long t2 = afterInvoke    - beforeInvoke;
> > 
> > System.out.println("Class load took:  " + t1



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic