Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

free memory vs heap  RSS feed

 
vijay kumarV
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had a performance report recently after the performance team ran through the load runner. It said that after running the application for 3 hours with 25 virtual users, the

1) the free memory was constantly declining which is something to be looked at
2) But there were no memory leaks and the heap size remains static through out which is agood sign.

I am not sure what is meant by the first point [free memory is declining] when the second point says there are no mem leaks and heap size is good.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the free memory is declining, then there's a memory leak, by definition. If the heap size is stable, then it's a small leak. Statement (1) and the "no leaks" statement are contradictory; that's the kind of thing you often get from a "performance team" whose abilities extend to the running of test tools, and the verbatim reporting of their results.
 
vijay kumarV
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. Does that mean that we will run out of memory after some time and will result in OutOfMemoryException? What can be done to identify the issue?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It might mean that, or it might mean that a JDBC connection cache (or thread cache or other cache) is being lazily filled up to some maximum number of entries, when it will stop. It's still a "leak" -- it's just a deliberate one

There are plenty of profiling tools that help you investigate this kind of thing; you may already have one available.
 
Deep Arora
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is what I would do in this situation.

1) take the thread dump and analyze if too many threads are locked at the same location in code.
2) Set Xms 7 XMX setting to the same
3) Tune the App Server JVM garbage collector againhen it depends which JVM U are using if it is weblogic jrockit then consult the BEA website or else just follow usual young / old generation heap size, my experience with our application is that setting young generation to the 25% of total heap and setting the survivor ratio to 7 helps improving the application performance.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!