I notice that whenever we set the max heap memory (using -Xmx ) the AdminTool shows the memory filling up as soon as the server starts. This seems to happen whether or not the minimum heap memory is specified. I get the same behavior whether using wrapper or invoking java directly in a start script. I also see it with the built-in jre 1.5.0 and with Sun's jdk1.6.0
Based on my understanding of the java memory model, I would have expected that it would start low and then jvm would ask the OS for more only as needed, until it had reached its max heap size. Does smartfox have its own internal heap?
Part of the reason for asking is that I'm still looking for good metrics to monitor the behavior of the system to know how close it is to capacity. If the jvm preallocates all available memory and then allocates it internally, the amount actually in use isn't visible externally.
Thanks
jvm heap memory questions
No, this is normal java behavior.Based on my understanding of the java memory model, I would have expected that it would start low and then jvm would ask the OS for more only as needed, until it had reached its max heap size. Does smartfox have its own internal heap?
This is difficult to find out, you would probably need to run a profiler or similar tools but it would kill the overall performance.Part of the reason for asking is that I'm still looking for good metrics to monitor the behavior of the system to know how close it is to capacity. If the jvm preallocates all available memory and then allocates it internally, the amount actually in use isn't visible externally.
Since the GC usually comes into play only when the heap memory is almost full, it's not very easy to determine the real usage unless you monitor object allocation etc...