This content has been marked as final. Show 3 replies
Hi,1 person found this helpful
there are many possible way of approaching to the JVM tuning... but first of all, you need more information on 'what exactly' is your JVM is doing... so, my first suggestion would be to somehow increase and interpret the JVM log [some additional JVM flags to enable GC logging are: -Xloggc:<PATH_TO_GC_LOG>/dps-gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime ]
In my personal experience (take it for what it is, it may not apply to other situations) I've observed that the following, 'sometimes' may help to improve performances:
1) Keeping a small enough JVM heap (you've set it to 1 GB only, but you could still raise a bit... let's say up to 2-2.5 GB is still reasonable)
2) If the heap is small enough (less than 4GB) then you could use the 32-bit server instead of the 64-bit [Note that Java 6 ergonomics will select the 64-bit Server JVM if the real O.S. has more than 2 CPUs(cores) and 2 GB of RAM] --> verify which JVM you're using, and in case, force the adoption of the 32-bit server [add the '-server -d32' flags]
3) Which JVM are you using? the default one shipped with 11gR1 is good, but now, it's a bit old... Sometimes I've seen some performance improvements using later JVMs (I.E. 1.6.0_30)
Last, but not least, tuning is never a single-shot approach... is always an iterative method... ;-)
Do I have to specify -XX:NewSize=683M -XX:MaxNewSize=683M? If so, what should these be if we base the initial and max heap size to 2G?
If you start having Java Out Of Memory errors or after monitoring the status of the Java Heap (you can also use the 'jvisualvm' utility shipped with Sun/Oracle Java JDK to do it 'live', but of course it may slightly impact performances), you see that your heap may not be large enough to cope with peak or other unexpected situations, then increasing the heap size (i.e. -Xms2G -Xmx2G) could be a good move.
Generally, if you increase the Java Heap sizes (-Xmx, -Xms), you may also want to increase the 'New' sizes (-XX:NewSize, -XX:MaxNewSize), to handle a higher workload/throughput (in terms of number of connections per unit of time). But again: monitoring the status of the JVM is really key in this phase, as it gives you precious informations and directions.