|
We are using V4R5, JDK 1.3. I don't believe we are using a custom class-loader because the main program of the "server" is run from the RUNJVA command. And all of the classes it uses, with the exception of the jt400.jar which I haven't been able to get at yet, have been CRTJVAPGMed at level 30. (The jt400.jar file does have over 100 classes with current Java programs, and this number has not changed for some time now.) The server uses RMI, so there may be some class-loading oddities there which I am not familiar with. So your theory is looking if not all wet then at least a little damp. PC2 -----Original Message----- From: Blair Wyman [mailto:blairw@us.ibm.com] Sent: November 16, 2001 16:05 To: java400-l@midrange.com Subject: Re: sluggish java program Mike wrote: > ...when the java class is instanced, the java program is > created on the iSeries. It is created using the command defaults for the > CRTJVAPGM command. Actually, the behavior you see at "first touch" depends on several factors -- most notably 1) the release of the operating system, and 2) whether the classes are loaded with a user class loader. Classes loaded by a "user class loader" -- ubiquitous in application servers -- only present themselves to the JVM as arrays of byte. So, since the RISC instruction stream is attached to the file in the IFS, we can't get at it even if it is there. This "surprise" provided significant impetus for us to obtain/implement a top-notch JIT, which we did. So, if your "first run" class is in a class loaded by a user class loader (pretty safe bet if it's running in a application server), and you are on an "older" release (V4R4 or earlier, IIRC?), then you are seeing the expense of a "first touch" CRTJVAPGM every time the application starts up. The only circumvention is to get a more current release, since the JIT was not "back-ported" to earlier releases. On the other hand, if you're on V4R5 or V5R1, then my theory is all wet (unless you are WAY back-level on PTFs). HTH. -blair Blair Wyman -- iSeries JVM -- (507) 253-2891 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "I was born not knowing, and have had only a little time to change that here and there." -- Richard P. Feynman "Mike Silvers" <msilvers@hbs-inc. To: <java400-l@midrange.com> com> cc: Sent by: Subject: Re: sluggish java program java400-l-admin@mi drange.com 11/15/2001 12:10 PM Please respond to java400-l You are correct..... when the java class is instanced, the java program is created on the iSeries. It is created using the command defaults for the CRTJVAPGM command. If you did not change these defaults, the optimization level is at 10. I believe that this causes the iSeries java program to be compiled at different times (I'm not sure what the criteria is for compiling). If you compile the jar file at optimization level 40, the java program will only recompile when the class file is changed. There is a give and take for the different optimization levels. At level 40 there is almost no debugging supported. At level 10 all debugging is supported. Mike ----- Original Message ----- From: "Urbanek, Marty" <Marty_Urbanek@stercomm.com> To: <java400-l@midrange.com> Sent: Thursday, November 15, 2001 12:55 PM Subject: Re: sluggish java program > I thought that once the class has been implicity compiled and a java program > object created, that it should not have to be compiled again via CRTJVAPGM. > Therefor the slowness should only occur once. > > I have a java program that behaves similarly. I subscribe to the slow class > loading theory. If possible, perhaps you could run your server interactively > and start your JVM with the -V option so it will display the classes as they > are loaded. This was very enlightening for me. It is amazing how many > classes it has to load. It takes significant time, at least on my program. I > am seeking a way to "pre-load" all this stuff so it will be ready when a > real request comes in. > > -Marty > > -------- original message ------------- > > > One thing about using jar files... to enhance performance, compile the jar > files before they are used (CRTJVAPGM). I always submit these compile jobs > to batch because it is a big job. If you do not compile these before using > them, the classes will be compiled the first time they are instanced. This > might be what is happening.... > > Mike > > ----- Original Message ----- > From: <AAnuszewski@hammer.net> > To: <java400-l@midrange.com> > Sent: Thursday, November 15, 2001 12:06 PM > Subject: Re: sluggish java program > > > > > > > > > > No. It is a simple tcp/ip socket server. It does use the jt400.jar to > manage > > connections with a data area and some data queues. > > > > Amy
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.