I would need some serious help with my application.Recently my QA did some performance testing on the QA machine and figured the application is consuming whole heap within one hour of Jmeter performance testing.See the Jmeter settings attached .
Application server:Tomcat Total RAM 3.6 GB
Applications running on system:None other then the application.
Operating system:Linux (Check VM summary image for more details.)
Number of processors :2
I installed Jconsole and changed some of the JVm settings to make my application to use parallel GC by adding UseParallelOldGC .But my application consumes the whole Old gen within an hour.Please tell me what should I use to improve my JVM settings so that my application does not consume "Old Gen". Please see attached image for my OLD Gen consumption.
System JVM Settings(Check VM summary image for more details):
Whoa! you go from 0 to 1.5GB in a matter of minutes. Normally, I would tell people to get a heap dump and run the heap dump through MAT to find where the high memory usage is. However, looking at this, you probably should start by doing a code review. It should be very evident where you are using 1.5GB of memory if you know what you are doing in your application
What are you trying to do here? Are you loading large objects? Are you loading lots of small objects?
We have a XML based SSO "XMl with user credentials and roles" and we are passing it between three different application.
Other then that we have JPA based fetching of you user information from database.the joins we use are really complex and consumes a lot of memory.
I have run my application using Jprofiler.All I can see is 600-700 mb of of char. There are millions of instances of Char arrays .If i drill them down I only see either some JSF files or some random strings.
What I conclude is that PS OLD memory is not getting released.I understand the application code has a lot of flaws but the only option left with me as of now is to improve GC and define a benchmark for my application so that it never reaches the stage if sent attached the screen shots for.
So i am trying the concurrent and parallel GC to clear the heap.What would be the best combination .?I am trying following options:
Get a hprof via JMap use Eclipse MAT (free) or Visual VM (with jdk). Look at the MAT reports particularly leak.
Are the Char reachable or not (do they have GC roots) is they are GCwon't help if not they have lived too long so CMS might or a full GC.
Ignore the Char  what's the first none primitive big thing "even" if it appears insignificant compare to Char .