I have jConsole monitoring our Tomcat v5 web-application using Suns 1.5_08 JDK.
Without any users on our web-app, what I find puzzling is that jConsole shows the heap usage going up, to then be gc'ed only to go up again - with the overall effect of the graph showing a gradual higher heap consumption. If I click the gc button in jConsole then the heap usage drops significantly - whereby the trend starts over again.
Dont look at JVM memory usage unless you have reason to. Typically its the job of GC thread to watch for heap usage and execute it at regular intervals to remove unreferenced objects. So this typically results in a JVM heap usage pattern as you have mentioned.
If you are facing issues with memory like getting OOM error, then you can try tweaking the JVM heap settings if that solve the problem. In case nothing works, you may need to look at the memory usage pattern using some memory profiler tools to determine if your application is leaking memory.
As long as you practice good design and coding practices in your application development, performance tuning/monitoring should not be attempted pro-actively unless the situation warrants it. In most cases it results in unwanted efforts spend on tweaking code, without any results, and at times spoiling readability and OO-ness of the code.
It could even be the communication with the JConsole which is creating those objects, I suppose.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Why don't you try disabling jConsole and running it with Auptyma JAM. Enable monitoring and see if the heap usage is still going up and down. Since JAM does not create any extra objects in the JVM, you'll be able to figure out if jconsole was creating the objects.
<a href="http://www.auptyma.com" target="_blank" rel="nofollow">The Peak of Performance</a>
Those cherries would go best on cherry cheesecake. Don't put those cherries on this tiny ad: