This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I was trying to profile as well as evaluate different versions of Java for my app. Started the app with '-Xms 100 -Xmx 300' on windows. With JDK 1.4 with a few transactions, this memory was used up and GC had to kick in. This repeats with transactions. Switched to JDK 1.5. This time, even with lot of transactions, the heap mem used stayed below 10M! And you could see partial GC kicking in at times.
This proved a considerable improvement. Hence thought of trying this out on Linux, which is my deployment environment. Started the app with '-Xms 100 -Xmx 300'. But this time, on both JDKs with a few transactions, this memory was used up and GC had to kick in. This repeats with transactions!
I wonder why the significant performance difference is not showing in Linux?
Apart from -Xms and -Xms I am not using any other VM options. Any insight is helpful.
You are running different versions - update 6 on Linux and update 16 on Windows.
Joined: Mar 30, 2005
Good catch! So I tried running the same test on Windows with JDK 1.5.0_06. I still see the same performance improvement as that of 1.5.0_16-b02.
JProfiler> CPU profiling enabled java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode) JProfiler> Hotspot compiler enabled
Another critical difference that I forgot to mention earlier is in case of windows I am starting my app THROUGH Jprofiler. For Linux it is remote-integrated. I have also posted a question to Jporfiler to see if they have anything to say on this.
Joined: Mar 30, 2005
Just another interesting update. I tried to see if this could be a problem with they profiling tool is running/controlling the VM. I repeated the exercise on Jprobe. This time on both JDK 1.4 and 1.5 the app memory stayed below 10 MB!!!
I will try running app as remote app and try again.