>Hi Gimbal2.. Thanks for your reply. Interesting observation... 70% of the total space is true for CMS collector as well.
Good point, I retract my earlier statement.
But I can still be partially right. For example Windows 7 tends to use up spare system memory for its own purposes; as long as nobody or nothing is using it, why not? Who is to say that the JVM doesn't do something similar. The fact that it doesn't go above 350mb just passed out hints, it being 70% of the total available space. Even if I keep spouting guesses, that is also my point; you can't really make any assumptions about how things happen or should happen. The JVM is a complex piece of machinery and who knows what tricks have been built in to make it as efficient as it is. The fact that you see high heap space usage isn't necessarily a sign that something is up; getting out of memory errors is more proof of that.
But then there are people like EJP and JVerd who have been around the block far longer than I have; I'm sure this thread will catch their eyes sooner or later and I'll probably be sent to stand in the newbie corner again :)
914935 wrote:That is "a" result that you see. Without making any accusations or assumptions about what you are thinking, I repeat my point: you may also see other results such as poorer GC performance as well. You can't really know what impact you are really making by looking at single statistics only.
As for Spare system memory for Windows 7(and why JVM doesn't do that), I have my own reservations on that point. When I use CMS collector, the max allocated heap is 65 MB, and used is 40 MB. I think it has got to do with the region HeapRegionSize , because when I decrese the HeapRegionSize , the used heap is lower.