× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Hi Paul,

Among other things, unless there's been a recent change, Java is not an ILE participant. I would go further than Dieter and run Java on a separate server. Among other things you can stay up to date with the latest and throw tons of cheap memory at it. JTOpen provides everything you need for AS/400 communication and calls.

Depending on what version you're running, I have a suggestion. I had a series that ran batch reports along with lots of other applications. The version I ran still had async garbage collection, which sounds like a great idea but wasn't implemented very well. At times things came to a complete halt. Turned out the system was starting another async collection before the previous one ended, and I believe they got into contention. There wasn't much I could do about it because the reports were third party and I had no control over them.

I was about to force then to go to a single threaded queue ( not job queue, just queue up the reports ) when admin "found" 8 gigs of extra memory. They added that to the pool and things worked after that. But that's an expensive solution in several ways.

Anyhow, I'd suggest pausing the job periodically during its run and see if that allows things to unclog. Obviously there's some contention or other work going on to cause the slowdown.

HTH, or gives some ideas.


Joe Sam

Joe Sam Shirah - www.conceptgo.com (904) 302-6870
conceptGO - Consulting/Development/Outsourcing
Java Filter Forum: www.ibm.com/developerworks/java
Just the JDBC FAQs: www.jguru.com/faq/JDBC
Going International? www.jguru.com/faq/I18N
Que Java400? www.jguru.com/faq/Java400


-----Original Message----- From: Steinmetz, Paul
Sent: Monday, June 22, 2015 3:04 PM
To: 'java400-l@xxxxxxxxxxxx'
Subject: RE: Java batch job performance issue

Dieter,

< A Java application ist started via QShell or QP2Term and programm java. What you are describing is looking like some Java, RPG, CLLE mix. What are you trying to accomplish, needing a mix of those three languages? That's far away from all best practices and as you noticed yourself, you will get lots of problems, you won't have with any of those languages by itself.>

Why should you not call Java from an RPGLE or CLLE pgm?

< But anyway best practice in Java is not to mix up Java with JNI for applications. JNI is designed for the implementation of the JVM and the Java Tools (java, javac, jar ...) not for writing applications.>

Again, why best practice?

Programmer added code to free up local Java objects.
Big improvement, but still loses performance over time.

"The job ran approx. 1 million API calls in 20 hours. I put in new code to free up local Java objects so the garbage collector makes note of them. The heap size was cut in half and it processed faster. The original one I ran on Tuesday - Wednesday took 6 hours 15 minutes to perform the first 400000. This one performed the 400000 in 3 hours 7 minutes.

However, it still appears to lose processing speed over time. At the start the job will perform 60 API calls per second. At the end, it only does about 6 API calls per second."

Paul



-----Original Message-----
From: JAVA400-L [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of D*B
Sent: Saturday, June 20, 2015 5:17 AM
To: java400-l@xxxxxxxxxxxx
Subject: Re: Java batch job performance issue

<Paul>
We are testing our first Java application</Paul> <Paul> The process is called from an RPGLE pgm, Java is initialized in CLLE pgm.
</Paul>

A Java application ist started via QShell or QP2Term and programm java. What you are describing is looking like some Java, RPG, CLLE mix. What are you trying to accomplish, needing a mix of those three languages? That's far away from all best practices and as you noticed yourself, you will get lots of problems, you won't have with any of those languages by itself.

Java on AS/400 (and all compatible systems) is optimized for server java, in other words: the startup of a JVM is rather slow (compared to Wintel and Co.), if it is once up and running speed is ok for older JVMs and good for
J9 JVM. Compared to native workload each JVM needs much more ressources than
5250 or RPG/CL Batch and the JNI support of the RPG compiler is rather buggy. But anyway best practice in Java is not to mix up Java with JNI for applications. JNI is designed for the implementation of the JVM and the Java Tools (java, javac, jar ...) not for writing applications.

If you are really needing RPG/Java interaction, an asynchronous approach (RPG talking to a Java Server Job via DataQ or socket connect) would be by far easier and better. Feel free to use my OpenSource appserver4rpg, it's the base layer for ArdGate and CommandGate and extendable.

D*B


--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.