• Post Reply Bookmark Topic Watch Topic
  • New Topic

JVM, OutOfMemoryError, MaxPermSpace  RSS feed

Sean Sullivan
Ranch Hand
Posts: 427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using IBM Websphere Application Server 4.0.6 on HP-UX
By default, Websphere 4.0.6 uses this JVM:
java.vm.vendor: Hewlett-Packard Company
java.vm.version: 1.3.1 PA2.0
java.vm.name: Java HotSpot(TM) Server VM

The stdout log file shows the following information:
Permanent generation is full...
increase MaxPermSize (current capacity is set to: 67108864 bytes)
HP's default JVM MaxPermSize is 64m
We are planning to set MaxPermSize to 128m

I found this information on HP's web site:

Q: What is the limit of the number of classes that can be loaded?
A: There is no limit to the number of classes that can be loaded other than
memory. Class definitions are loaded into the PermSpace by the class loader.
When the PermSpace fills up you will begin to get OutOfMemoryError
exceptions. You can make the PermSpace larger by using the -XX:MaxPermSize=
<value>. The default is 64MB. Prior to making a change, it
may be a good idea to run with -Xverbosegc
and use HPjtune
http://www.hp.com/products1/unix/java/java2/hpjtune/index.html to observe the use of the Permanent space.


According to:
ming: There's an unsupported Java option -XX:MaxPermSize. What kind of objects are stored in this area?
SteveWilson: HotSpot stores some of its own internal data structures as Java objects--but they're stored in a separate area. This area is called the Perm Space. Things like the internal representation of classes, methods and fields are stored here. The only reason you might need to adjust this is if you've loaded a truly huge number of classes.
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure I saw a question in there? One other issue involving Websphere is heap fragmentation if you need to load a lot of native code, like JDBC drivers. Native code is "pinned" in memory which can cause severe fragmentation under certain conditions. I'm no expert on Java memory management but some of the experts at work were discussing how, even though we were using a 1 GB heap size, we still would occasionally get OutOfMemoryExceptions because of fragmentation.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!