0

We are receiving alerts from the Websphere Application Server 7.0.25 whenever heap memory reaches to 90% but Garbage Collection did not run at that moment. We monitor the memory and found that GC is running only after 99% of heap memory usage. The JVM parameters are set as:

Initial Heap Memory - 128MB

Max Heap Memory - 512MB

Please suggest is there anyway, where GC starts after reaching 90% or less than that heap memory utilization.

Zong
  • 6,160
  • 5
  • 32
  • 46
user3645377
  • 11
  • 1
  • 1
  • I would point out the IBM JVM is different from the Oracle JVM, and specific to WebSphere has different configurations for WebApplications. – Paul Bastide May 16 '14 at 17:24
  • 1
    Yes I agree with your Point that IBM JVM is different from the Oracle JVM and with use of Oracle JVM we monitor GC cycle is more frequent. What you mean by WebSphere has different configurations for WebApplications. Can I get which configuration you are talking about. – user3645377 May 16 '14 at 18:42
  • you can change your Java Process to have a Max Heap Memory which is higher, you can also turn on verbose Garbage Collection -X verbosegc and get an output that will tell you exactly what is going on – Paul Bastide May 16 '14 at 19:04
  • We have already turn on verbose Garbage Collection -X verbosegc. And Max we have 512 MB Heap memory. My question is why GC runs after its reach to 99%? or is there any way or parameter which we can set in WAS so that GC will run before its reach to 90%. I mean any JVM argument? – user3645377 May 16 '14 at 19:10

1 Answers1

1

From http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html I found this option -XX:InitiatingHeapOccupancyPercent=n the description:

Percentage of the (entire) heap occupancy to start a concurrent GC cycle. It is used by GCs that trigger a concurrent GC cycle based on the occupancy of the entire heap, not just one of the generations (e.g., G1). A value of 0 denotes 'do constant GC cycles'. The default value is 45.

Give it a try.

markusw
  • 1,975
  • 16
  • 28