Java (SE) program execution is too slow on Debian Wheezy... do I need to "tune" the JVM?

1

SuperUsers.

I wrote a desktop program to execute a simulation process (not worth copying the code here... it's quite a long program). If I run it on a MacBook Pro (Intel Core i7 2.2 GHz, 4GB RAM), it takes about one hour to complete. However, when I run the exact same program on my Debian Linux desktop (Intel Core i7, 3.4 GHz, 8GB RAM, running Wheezy 64bits), it takes up to three hours! It is exactly the same program! (By the way, I use Oracle's JDK 8 on both computers).

Googling around I found this blog, which tells how to enable "large pages" on Linux... I tried exactly that, but the performance boost is minimal. Before I do something I might regret, I'd like some guidance:

  1. Enabling "large pages" really has an impact on the JVM (specifically, do Java programs run better)?
  2. Are there any other "tunning" options I can use to speed up things? (As you can see above, it is not a hardware issue, the Debian desktop literally flies when I perform some other complex stuff... but Java programs are simply dragging... and I would like not having to rewrite them on some other language)

Thanks in advance

Barranka

Posted 2014-03-24T23:51:18.923

Reputation: 179

Do you have other CPU-intensive tasks running in the background on the Debian system? – Wyzard – 2014-03-25T00:25:24.387

@Wyzard None (that I'm aware of)... The CPU usage when I run the Java program is about 3 to 5 percent – Barranka – 2014-03-25T00:28:12.887

1One thing you should do is run the program using the "time" command on both computers. That'll tell you the amount of actual CPU time (as opposed to real-world time) taken by the program. Check whether that's similar between the two computers, or much longer on the Debian one. (Specifically, look at the "user" and "sys" numbers reported by the "time" program.) – Wyzard – 2014-03-25T00:31:26.310

Are you sure under Debian that you're invoking the Sun java executable and not the icedtea version? – LawrenceC – 2014-03-25T01:31:31.953

@ultrasawblade The command I'm using is: /usr/local/jdk8.0/bin/java -jar MyProgram.jar... so I'm pretty sure I'm using the right one ;) – Barranka – 2014-03-25T06:43:03.577

Have you tried Java 7? Java 8 is pretty new and regressions aren't inconceivable. – jjlin – 2014-03-25T18:00:37.883

No answers