Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Java performance issues - What am I doing wrong

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Java performance issues - What am I doing wrong

    What is "terrible" performance? Have you tested a single query to see how it works? Do you have the proper indexes over your database to allow these queries to perform properly? What is the load like on your iSeries when you run it? What it the load on your network? How much data is being transferred? How much time is being spent in data transfer vs. data conversion? You need to break the job down into discrete pieces and analyze each of the pieces. In your case, there is the query on the host, the transfer of data to the Linux client, and the conversion of the data to Java objects. I would suggest timing each piece of that job to first determine where your primary bottleneck is. Joe

  • #2
    Java performance issues - What am I doing wrong

    We have a Linux server running Tomcat accessing data on our AS/400. The performance I'm getting out of my Java data access classes is terrible. Can someone take a look at the attached class and let me know if you see anything wrong. All of my DAO objects are setup the same way with the exception of a couple making program calls instead of SQL. I tried RLA in place of SQL when going after a single record, but there was no gain in performance

    OrderDAO.java

    Comment


    • #3
      Java performance issues - What am I doing wrong

      The beauty of Java is that it is truly portable. Which means that you can test your classes on the iSeries as easily as on the Tomcat box. The task at hand is to isolate the bottleneck, so the first thing I would suggest would be to take your data access classes and move them to the iSeries. Write a simple program to call those classes, and compare the results. It's not that simple - JVM startup on the iSeries can be a pain, so the only good way to test timing is to put some timing messages in your test program. I suggest creating a simple application that outputs a timing message, gets an order, and then outputs another timing message. Compare the results on the Tomcat machine to those when running natively on the iSeries. If there is a large discrepancy, then the likely culprit is either network latency or conversion overhead. If the iSeries is as slow as the Tomcat machine (or close), then you need to look at your indexes. This is a starting point. Continue breaking your jobstream into discrete tasks and identify the bottleneck. Until you've done that there's really not enough information to allow someone to give you firm advice. Joe

      Comment

      Working...
      X