简体   繁体   中英

How to determine allocation of heap size and permgen space of tomcat?

I have my application hosted in tomcat 6.0 of liferay 5.2.3 . I have allocated heap size as --JvmMx 512 and permgen -XX:MaxPermSize=512m. But i am confused about how to determine the exact heap and permgen which is minimum for my application to run. Can anyone specify how to find that out? Thanks.

Use jconsole to profile your application.

Practically its tough to determine appropriate size of heap. If value is too low then frequency of GC cycle will be high and if value is high then GC will take longer time. We should avoid both extreme cases.

You can run your application and profile using jconsole by keeping multiple heap values. This way you will get better idea about your heap configuration.

You can attach a profiler to see graphically how your heap space is used. Visualvm is a good java profiler you can try.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM