My current application running on 2GB memory Normal GC cycle.
I want to increase JVM memory to 4GB to incrase application performance.
will it incraese GC time? If yes how much performance will get affected. Is their any good artical to tune GC?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Short Answer
Yes, the time will increase. Bigger Heap = Longer Pause Times
Long Answer
There are a few factors to consider. How have you configured your GC to run? how big have you sized your young gen? How often do you see full GC’s?
If you rarely see full GC’s then the difference will be negligible. If you log your GC activity to log you can see the pause times for a partial GC is very quick. The difference between 2GB and 4GB on a partial GC will be around 0.1s. To log the GC activity you can use the following parameters
-XX:+PrintGCDetails -verbose:gc -Xloggc:/log/path/gc.log. There are many tools out there which will read this GC log for you, provide graphs and stats such as throughput and total pause times.If you are seeing frequent Full GC’s and that is why you want to add more memory then you may want to consider profiling the application instead to see what is eating up all the memory. With a bigger heap, these problems will only cause longer GC’s until you fix the underlying problems.
In the end you need to try the various configurations, test properly and put into your production environment what will work best for you.