I see that with -Xmx2g, the peak memory reaches 1G and does major collections (marksweep collector). With -Xmx3g, it reaches 1.5G and does a major collections. With -Xmg4g, it reaches 2G and does major collections. But, from here I tried increasing max memory to 6G, 8G, 12G and all the times the peak memory reaches 2G does major collections.
How to make it use beyond 2G? I didn't come across any setting for this. Does -Xms matter here? Fo those -Xmx, I made -Xms half of -Xmx.
I am using Jetty, Java 1.6.024.
Yes, I am using 64-bit JVM.
The JVM options I am using are: -Xmx6g -Xms3g -XX:MaxPermSize=256m
The way I am determining the peak memory is by looking at the memory graph in JConsole. It reaches 2G and drops (major collection). Old Gen reaches 1.5G max and then drop happens.
以上就是Peak memory usage does not go beyond a limit的详细内容，更多请关注web前端其它相关文章！