• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

PERM, -Xms and -Xmx

 
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the use of parameter - PERM and -Xmx and -Xms in Tomcat startup.sh?

We received out of memory errors, when tomcat PERM was set to 512m. We reduced it to 192 M and the error went away. So, i can understand that PERM is to set the Java heap size. What are the other two variables.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll give you a brief overview of what they mean (which is about all I'm capable of ). Then if you want to learn more about it, you should probably ask that this thread be moved to Java In General (Intermediate)..


The JVM divides the alloted memory (heap) into different sections called generations. These divisions help to make Garbage collection more efficient.

One of these is the PermGen. It is where the classs and method are stored.
Interned strings are stored here as well. As its name suggests what's in here is pretty much there for the life of the application.

-XX:MaxPermSize. sets the your PermGen size
-Xmx sets the maximum size that your heap can be and -Xms sets the initial size for the heap.


If you raised your PermGen setting to a high number (like 512M) but didn't also increase the overall size of the heap. The PermGen probably hogged everything and didn't leave enough for your application's (and Tomcat's) objects.

Again, this stuff isn't really Tomcat specific.
It has to do with the JVM itself which means that you'll probably get more detailed explanations in our Java In General forums.


This article might help.
http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html#introduction
[ February 29, 2008: Message edited by: Ben Souther ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic