1

I have following piece of code:

        List<Long> array = new ArrayList<>();
        for (int i = 0; i < 30000; i++)
        {
            array.add(Long.valueOf(i));
        }
        for (int j = 0; j < 30000; j++)
        {
            for (int i = 0; i < 30000 - j; i++)
            {
                array.set(i, array.get(i) + j);
            }
        }

When I compile it and run it under Oracle JVM on my local machine (JRE 1.7_0_71, Win 7 64bit, 4 Cores, 8GB RAM), I get times around 3,5s for run.

1.run: 3446ms
2.run: 3485ms
3.run: 3546ms
4.run: 3721ms
5.run: 3573ms

When I run it on AIX machine (POWER7+, 16 Cores, 64GB RAM) with IBM JVM (j9, java 7,build pap6470_27sr2-20141101_01(SR2)), I get results at almost 9s per run.

1.run: 8518ms
2.run: 8548ms
3.run: 8499ms
4.run: 8486ms
5.run: 9235ms

Any idea where could be catch?

5
  • Have you tried it on different machines? and did you try it in isolated mode? Commented Nov 11, 2014 at 4:41
  • I tried it on several aix machines and all the results were very poor. Also I did similar test with code written in C and that one was faster on AIX. Maybe some JVM option? Or some AIX setting? How exactly you mean isolated mode? Almost anything else was running on the server at the time of execution.
    – Uhla
    Commented Nov 11, 2014 at 13:39
  • can you please post it on developers.ibm.com and their buglist? Maybe they might have fixed this issue or some setting is present for the same. Because we are using IBM JVM java7 for our product which is under dev. so I want to avoid this issue in future. Thanks in advance :) Commented Nov 12, 2014 at 5:23
  • I have put this question to developerworks forum: ibm.com/developerworks/community/forums/html/… . When I will not get answer, I will raise it as a bug then.
    – Uhla
    Commented Nov 19, 2014 at 19:24
  • Based on data which you provided in your question, it is very hard to tell that statement "Java runs slowly on mine AIX machine" is justified. Software stack on x86 is different. Why not trying to compare same version of J9 on x86? Also it is questionable how much CPU power you have on AIX machine. AIX users often have admin policies which limit CPU time. And even if you have full CPU access, POWER7's clock range differs from 2.4 GHz to 4.25 GHz.
    – Talijanac
    Commented Apr 6, 2016 at 19:03

2 Answers 2

1

You have 3 issues.

  1. Your processor architecture
  2. Your operating system choice
  3. Your JVM provider

Of these, the biggest impact in this case will be the IBM JRE which has really poor performance for loops. Were you doing file work, you'd find it was slow due to the operating system. There are many many causes of slowness with this combination, your best bet is to move to x86, Linux and Oracle.

0

We have done very detailed analysis using Dynatrace, and we have found that the IBM JDK on Windows simply outperforms the same IBM JDK release on AIX, by a wide margin.

  • 20-30% on some real world tests
  • 50-100% on others
  • 5-6x on some benchmarks

We did get significant improvement on AIX by moving from JDK 1.6 to 1.7. Research seems to indicate that V8 has some slow down, again.

The time spent seems to be actual CPU time. The IBM JDK on AIX appears to just be working harder to do the same amount of work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.