Skip to main content

free memory vs heap

2 replies [Last post]
Joined: 2006-10-28
Points: 0

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.

Reply viewing options

Joined: 2006-10-31
Points: 0

Heap size would remain static, because usually that is a predetermined size by an administrator.

Free memory declining can be normal behavior because that means the virtual users were causing some activity which was using more memory.

Where is this information being reported from? Is this a profiling tool or through something like top?

What you have to look out for is whether the memory is being garbage collected and returned to the heap, if it is not entirely being returned then you would have memory

Joined: 2004-01-07
Points: 0

Well first of all it needs to be defined what is a leak and what not. If you've a cache which can grow as large as it would be optimal this is no leak but it can lead to out-of-memory errors and declining free heap.

If memory useage goes up without any reason (data which needs to be temorarily saved, caches that grow till a defined limit, ...) than there are leaks - but maybe their analysis tool doesn't find them.

A small increase of used memory in permament generation is normal, since jit'ed methods and other runtime stuff gets stored there.

lg Clemens

Maybe you could simply run your app for several hours/days and see what happens?