Java : how to check current Perm / PermGen Size?

后端 未结 4 1101
星月不相逢
星月不相逢 2021-01-31 19:50

Yesterday when I was running the WebLogic Application Server 11g installer, I encountered a OutOfMemory error, so I Googled for the answer:

java -Xms256m -Xmx512         


        
4条回答
  •  滥情空心
    2021-01-31 20:47

    You can use something like VisualVM, http://java.dzone.com/articles/best-kept-secret-jdk-visualvm&default=false&zid=159&browser=16&mid=0&refresh=0, to monitor your memory usage and you will see the max by where it peaks, and it will give you specific info as to which part of memory is actually full, so you can better optimize your environment.

    You may find that some part of memory that you don't think about is actually filling up, and by monitoring it you can see what you need to do to get better performance.

提交回复
热议问题