Discussions

Performance and scalability: JVM memory usage in wls8.1

  1. JVM memory usage in wls8.1 (8 messages)

    I am facing problem with memory usage of wls8.1

    memory paramets as : -Xms256m -Xmx640m

    Servers->Monitoring->Performence shows
    Startup: Max as 604m and used memory as 200m.

    Using top command, system free memory is 800MB for 1GB RAM Linux system.

    During application run time, Memory performence graph of weblogic shows Max available is 270mb and used memory is 160mb, at this point of time the system has around 300 mb/400mb/500mb free memory.

    When a condition like this occurs the Stateful EJB gives locked and the application becomes very slow, if we leave it in that state over night gives OutOfMemory Error

    Here i am not able to understand why the JVM is not able to scale its heap memory higher with syste having free RAM space.

    Plz help me with this.

    Thanks in Advace
    Reshma

    Threaded Messages (8)

  2. JVM memory usage in wls8.1[ Go to top ]

    May be time to think about 2 gigs...
    But before that, profile your app, eliminate leaks, reduce transient mem alloc.
    You may be having aquery with unexpected large result set which do not fit in ram, but once dropped, the heap usage seams normal.

    Otherwise, sum that up: you got 1 gig ram. You have a 200meg overhead (cold), but you may have more than that once warmed up (buch of .so lazy loaded? disk cache? +50).
    Plus the jvm overhead (jit compiler is greedy, seen 150 megs for 2000 classes), the object heap itself 600m. Sounds to me like you are filling your gig of ram.
  3. Other options[ Go to top ]

    Hmm! First thing, try setting max and min JVM heap size same so that you are sure that JVM will get the memory. I recommend that you do not set this to more than 512 MB. Next, check how many CPUs you have. Make sure number of GC threads is set as equal to number of CPUs. Now set GC verbose and observe. If you have any profiling tools, you may get better picture. Try OptimizeIt.

    Did you check if there is any "memory leak", that is, you have any static arrays/collections which are accumulating the objects? Profilers will be able to tell you that. I guess thereon you just have to try other JVM tuning options and consider going to 2 GB.
  4. Re: GC thead count Setting?[ Go to top ]

    Next, check how many CPUs you have. Make sure number of GC threads is set as >equal to number of CPUs

    We have 4 CPU's, how can we modify the GC thread count == no of CPU'S.

    Thanks for the response,
    Reshma
  5. JVM memory usage in wls8.1[ Go to top ]

    May also have to increase MAX PERM SIZE .. with WebLogic you will have to set it to at least 128m.

    Peace,

    Cameron Purdy
    Tangosol, Inc.
    Coherence: Clustered JCache for Grid Computing!
  6. Re: MAX PERM SIZE[ Go to top ]

    May also have to increase MAX PERM SIZE .. with WebLogic you will have to set >it to at least 128m.

    It will be helpful to me if i get to know how setting 'MAX PERM SIZE' will help .

    Thanks for the response,
    reshma
  7. Re: MAX PERM SIZE[ Go to top ]

    May also have to increase MAX PERM SIZE .. with WebLogic you will have to set >it to at least 128m.

    It will be helpful to me if i get to know how setting 'MAX PERM SIZE' will help .

    Thanks for the response,
    reshma
  8. Re: MAX PERM SIZE[ Go to top ]

    Just use Google .. it's all over the web:

    -XX:MaxPermSize=128m

    Peace,

    Cameron Purdy
    Tangosol, Inc.
    Coherence: Clustered JCache for Grid Computing!
  9. When a condition like this occurs the Stateful EJB gives locked and the application becomes very slow, if we leave it in that state over night gives OutOfMemory ErrorHere
    You should start trying to remove the memory leak, because adding more memory (or being able to instruct to the JVM to get more memory) is only going to let the problem arise latter.

    You should try to watch the console, in order to look for messages such as 'NotSerializableException', because this kind of messages are the classical ones that you get when the JVM doesn't know how to remove a EJB.

    You could use also tools such as PerformaSure, in order to see which EJB are created all the time, but never removed. When you know this, you can modify the source code in order to remove the problem that causes the memory leak.


    Jose R. Huerga
    http://www.terra.es/personal/jrhuerga