3

For my application we have recently upgraded to java 1.8 from 1.7 and as per the performance test results we checked that CPU utilization is a big issue and it has increased by 71% !!

I'm using this below jvm arguments with jdk8:

    -XX:-OptimizeStringConcat -XX:SurvivorRatio=6 -XX:+UseG1GC -XX:-UseGCOverheadLimit

Apart from all these the most import thing which I'm very confused is what is the MaxMetaSpaceSize we should choose now .

For Jdk1.7 I was using :

    -Xms480M -Xmx480M -XX:MaxPermSize=192M

Kept everything same in jdk1.8 only changed the MaxPermSize to MaxMetaSpaceSize :

    -Xms480M -Xmx480M -XX:MaxMetaspaceSize=192M

Please let me know how can I improve the performance of my application . is there anything that I'm missing - since jdk8 is using native memory area , therefore

  1. inceasing the space on the server help or not .
  2. I kept the value of MaxMetaspaceSize same as that of earlier - how can i decide on this value on this new architecture.
Siddhartha
  • 492
  • 1
  • 5
  • 15
  • 4
    Why are you setting MaxMetaspaceSize? Metaspace isn't the same as PermGen anyway so I very much doubt you want the same value. Do you know what the JVM is doing with all that CPU? Have you got a thread dump? – sisyphus Mar 30 '16 at 09:23
  • thanks @sisyphus for helping out - Earlier we were using "MaxPermSize" , therefore after upgrading it to 1.8 , i thought will use "MaxMetaspaceSize" . but yes you are correct , both are not the same . We have got heap dumps from performance testing - is thread dump same as that of heap dump ? – Siddhartha Mar 30 '16 at 10:04
  • They're not the same, no. A heap dump will tell you what's in memory, and a thread dump will tell you what threads were active. Both would be useful. However, if you've got a problem with CPU usage it's probably best to start with a thread dump. – sisyphus Mar 30 '16 at 10:13
  • With a 480M heap you don't need G1 – the8472 Mar 30 '16 at 10:13
  • 3
    It would also be worth investigating any GC logging you might have - G1 can have a slightly higher CPU usage, from my experience, and you may have your options set in a way which makes it quite sub-optimal. – sisyphus Mar 30 '16 at 10:30
  • Remove all GC options and see how it performs. – keuleJ Mar 31 '16 at 05:11
  • Get a trial of yourkit profiler and run it with your program – Marged Mar 31 '16 at 05:32

0 Answers0