Need help with need to Force Garbage Collect

Discussion in 'Java' started by John, Aug 19, 2004.

  1. John

    John Guest

    I have a situation where a 3rd party application (war file) is
    bounding high on heap. I have to intervene by using the application
    server to force a full garbage collect. The start up string is a
    follows :

    javaMemoryOptions=-verbose:gc -XX:+PrintGCTimeStamps
    -Xloggc:/u1/logs/bea/domain
    s/starsweb1/EUS_gc.log -Xmx256m -Xms256m

    Are there any hints on what I may need to change, such as newsize? Any
    hints are appreciated.
     
    John, Aug 19, 2004
    #1
    1. Advertising

  2. John wrote:

    > I have a situation where a 3rd party application (war file) is
    > bounding high on heap. I have to intervene by using the application
    > server to force a full garbage collect.


    Then you're probably out of luck. There is no way to _force_ any GC,
    much less a "full" GC, assuming your JVM is even using a GC strategy
    wherein that makes any sense. On the other hand, it is unlikely that
    you actually do need to force GC: the JVM will perform GC when and how
    it needs to do, without your help.

    > The start up string is a
    > follows :
    >
    > javaMemoryOptions=-verbose:gc -XX:+PrintGCTimeStamps
    > -Xloggc:/u1/logs/bea/domain
    > s/starsweb1/EUS_gc.log -Xmx256m -Xms256m
    >
    > Are there any hints on what I may need to change, such as newsize? Any
    > hints are appreciated.


    You may assign more heap space to the server by increasing the number in
    the -Xmx parameter. If you _know_ the server will need more than 256MB
    of RAM then it may be slightly to your advantage to increase the
    parameter to -Xms as well. If the 3rd-party WAR is inappropriately
    packratting objects (thus causing its memory consumption to increase
    without bound) then your options are (1) get the app supplier to fix the
    app and (2) periodically unload and reload it. (The latter _probably_
    works in an app server scenario, but that depends on the details of the
    app server, and possibly on the details of the app.)


    John Bollinger
     
    John C. Bollinger, Aug 19, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UGF1bA==?=

    need to collect event information at end of application

    =?Utf-8?B?UGF1bA==?=, Jul 24, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    320
    Mark Fitzpatrick
    Jul 24, 2004
  2. D. Alvarado

    Can I force garbage collection?

    D. Alvarado, Sep 23, 2004, in forum: Java
    Replies:
    6
    Views:
    35,429
    wwonka
    Sep 30, 2010
  3. Replies:
    1
    Views:
    452
    mrstephengross
    Jul 25, 2005
  4. rfv-370
    Replies:
    10
    Views:
    975
    M├ęta-MCI \(MVP\)
    Aug 29, 2007
  5. dd
    Replies:
    1
    Views:
    123
Loading...

Share This Page