When will wls try to garbage collect ?

The docs for the option "Low memory GC threshold" say that this is the "Threshold
level at which WLS will try to garbage collect once the granularity report has
been met".
My question is: When is this condition met ? If at least once there has been a
granularity report in the log ? Or if the server has been set to Warning state
The problem Im trying to address is that my "Low memory GC threshold" is set to
20% and my server has reached only 1% free memory and garbage collection did not
run, I had to force it via console.
Thanks in advance, Giselle

I am wonder when the WLS activate or passivate session and how can I          control it?
          > From documents, sessionWillPassivate in HttpSessionActivationListener will
          be
          > executed when a session is about to passivate on one server (ie. WLS
          instance)
          > and the sessionDidActivate method when the same session has been activated
          on
          > a second server.
          >
          > But I have monitor the behavior for a long time by setting
          PersistentStoreType
          > to file, memory, replicated. sessionDidActivate and sessionWillPassivate
          will
          > never executed. I expected it will passivate and activate when session is
          replicated
          > between servers or persist in files. Any ideas?
          What version of WL? the interface you describe was new in Servlet 2.3, so it
          may not be implemented until 6.1 or even 7.x.
          Peace,
          Cameron Purdy
          Tangosol, Inc.
          http://www.tangosol.com/coherence.jsp
          Tangosol Coherence: Clustered Replicated Cache for Weblogic
          "Karen Law" <[email protected]> wrote in message
          news:3ec86188$[email protected]..
          >
          

Similar Messages

  • When will WLS 8.1 SP2 be GA ?

    Hi BEA,
    When will SP2 for WLS 8.1 be GA ?
    I see some fixes i need on the release notes but
    SP2 is not available for download.
    Thanks
    Yshemi

    I bought my Icon just a few days over 2 months ago expecting it to ship with 8.1.  I can not communicate how disappointed I am in VZ for NOT sending the 8.1 update out.  I have used Apple and Android, each have their own following but to do this to paying customers is not right.  I work for a software company that relys heavily on Microsoft products and we would NEVER do this to a customer.  If it was not for the fact that I had terrible coverage from AT&T I would look at switching to another carrier but VZ is about the only reliable one where I live.
    But this latest trick is more than disheartening, it should approach being illegal.  And I had the same experience when asking about the Icon in a VZ store before buying it.  The salesperson didn't want to talk Windows Phone anything and kept pushing Galaxy and iPhone.  That is why I ordered mine online, because of their sales rep.
    Not a good move VZ to keep customers happy!

  • Will system.gc() force garbage collection?

    what impact will the method system.gc() have if i call it in one of the user methods.

    If you use Sun's HotSpot 1.5.0 JVM (or later) with the -XX:+UseConcurrentMarkSweepGC (low-latency) garbage collector, you can use the additional flag -XX:+ExplicitGCInvokesConcurrent to have calls to System.gc() initiate a concurrent collection, rather than cause a stop-the-world compacting collection, which calling System.gc() usually does. Most people who run the low-latency collector are trying to avoid the pauses caused by compacting collections.
    If you have some annoying third-party library that calls System.gc() and that upsets your application's performance, you can use the additional flag -XX:+DisableExplicitGC to make calls to System.gc() into no-ops. That works with whatever collector you are using.

  • Manual garbage collection

    Im running a huge combinatorial generation algorithm and i'm starting to run into memory allocation errors on larger problem instances. I am using the -Xmx256m run time option on the JVM to give it more memory but im generating huge masses off stuff here.
    The question I have is, if I know an object isnt going to be used again is it worth destroying it in memory yourself; i assume if you have some undesired object you can do something like this;
    myObject = null;
    and then call the garbage collector to free up the memory..firstly will this work, secondly what is there performance tradeoff for calling the garbage collector more often and lastly is the garbage collector allready efficient enough that doing things like this is probably not worth it.
    Regards,
    Dave

    Setting references to null MAY help get immediate relief, but its not guarunteed to help. Same with the System.gc() call.
    Doing both those thing will not enable the system to operate with less memory than before, as variables that are out of scope will be discovered during garbage collection, and garbage collection WILL run when the heap is fully utilized.
    Doing the above may make the GC pause lower at the expense of worse performance.
    Instead of doing the above, I'd recommand using the Incremental GC by specifying -Xincgc on the command line. This will run GC more often in the background, leading to shorter GC pauses, but about 10% performance hit in general.
    If OTOH you are running into OutOfMemoryErrors and don't think you should be, you probably have a memory leak. Most likely you are allocating objects and storing them somewhere then forgetting about them. For example, if you stick an object in a HashMap, and then forget about it, that object will not be GC'd, unless the HashMap can be GC'd.

  • Nested object reference after garbage collection

    I have a question about how GC works.
    Assume I have a Class A which has a reference to class B inside it. I create a object of class B and assign to member variable of class A.
    Now when obja is no longer needed, I set it null. And when GC runs, the object will be removed from memory. But should I also need to explicitly set objb to null. If i don't set it, will it also get garbage collected when obja is being removed from memory?
    public class ClassA {
    private ClassB objB = new ClassB();
    private static void main(String args[]) {
    ClassA obja = new ClassA();
    obja = null;
    }

    801625 wrote:
    But should I also need to explicitly set objb to null.No.
    If i don't set it, will it also get garbage collected when obja is being removed from memory?If there are no other references outside of classA to the object referenced by objB (in your case an instance of ClassB) then it will be garbage collected.
    Note - the only time one needs to set a reference to null is if one wants the object it references to be eligible for GC before the reference goes out of scope. There is a slight complication to this - depending on the JVM implementation, if a reference is defined in a block internal to a method then even though it goes out of scope when execution goes out of the block anything it references may not be eligible for GC until the method exits.

  • Garbage collection - setStyle should be removed?

    i've list-based components. when i no longer require them, i just use removeChild() method. i've applied setStyle() method to them. i'm a bit consufed, do i really need to use clearStyle() method or without doing it, flash will take them in garbage collection??

    I'd say do whatever you can with styles. I'm not sure how much GC-enabling clearing does, but also set the styleNAme to null. However, I'd think that styles like color, fontSize and the like wouldn't create memory leaks. Not sure about skinds (if you use them).
    Are you running into some significant memory leaks, or just trying to be as clean as you can be?
    To state what might already be known, two of the primary concerns for making your ojbects eligible for GC are to:
    After you remove visual objects from the display list, nullify your object reference
    For any event listeners you added to your objects, be sure to call removeEventListener for all of them
    That is just the basics, though, and I can't do this topic justice compared to the number of good articles you can find online by searching for this subject:
    http://lmgtfy.com/?q=as3+garbage+collection

  • A question about JNI references, persistence, and garbage collection

    I am writing a library to allow our Java developers to access C functions in our product. I want people on the Java side to be able to instantiate instances of a new object (on the C side), say "Map", and I want those objects to persist until they are destroyed on the Java side. I am thinking of creating a wrapper for the native methods, which stores an identifier for the instance of an object. When the C object is accessed, the identifier is passed to the C code which looks up the correct object in a table. I understand that if I use the NewGlobalReference call in JNI I can get objects to persist.
    When it is time for garbage collection I plan to override finalize() to call the C code and tell it to remove the Global Reference.
    Here's what I have in mind
    public class JMap() {
         private static int id;
         static {
              System.loadLibrary("libMap");
              /*Call C method which instantiates object and creates a GlobalReference
              which is stored in table. Returns ID for reference*/
              id = _init();
         public void setSize(int x, int y) {
              _setSize(id, x, y);
         public void finalize() {
              _finalize(id);
              super.finalize();
         private native int _init();
         /*calls DeleteGlobalReference for the reference matching this id*/
         private native void _finalize(int id);
         private native void _setSize(int id, int x, int y);
    }Is this the right thing to do? Have I understood the way JNI works with regard to GlobalReferences?
    Any comments, tips or pointers would be appreciated :)

    This probably should have been posted in the Native Methods sub-forum, I have reposted there:
    http://forum.java.sun.com/thread.jspa?threadID=657667
    Mods please delete this post :)

  • Garbage Collection For Collection

    Collection obj = new ArralyList();
    obj.add(1,"A");
    obj.add(2,"B");
    obj.add(3,"C");
    obj.add(4,"D");
    obj.add(5,"E");
    Will this obj be garbage collected , or i need to explicitly assign obj = null

    Depends entirely on the scope of the object. There's no way to answer the question from the information given

  • Does 5.1 log garbage collection like 4.5.2?

    The weblogic 4.5.2 release notes state that the server will log whenever it
    garbage collects, see below. Does 5.1 do this?
    "We changed the distributed garbage collection server to always indicate
    that it is running by adding entries to the Server log file. A typical entry
    is:
    Thu Aug 19 19:44:28 PDT 1999:<I> <DGCserver>
    Freed 1086 objects in 30 ms, 24 exported object remain."

    It should. There is a slight possibility that it might not appear as a
    feature until service pack No. 4 if the change to version 4.5.2 was not done
    until after service pack three was completed.
    If you do not see it in service pack No. 4, please report to support.
    Thanks,
    Michael
    Michael Girdley
    Product Manager, WebLogic Server & Express
    BEA Systems Inc
    Mark Johnson <[email protected]> wrote in message
    news:396bbb8f$[email protected]..
    The weblogic 4.5.2 release notes state that the server will log wheneverit
    garbage collects, see below. Does 5.1 do this?
    "We changed the distributed garbage collection server to always indicate
    that it is running by adding entries to the Server log file. A typicalentry
    is:
    Thu Aug 19 19:44:28 PDT 1999:<I> <DGCserver>
    Freed 1086 objects in 30 ms, 24 exported object remain."

  • When will the demo object be eleigible for garbage collection?

    class Test {
         private Demo d;
         void start() {
         d = new Demo();
         this.takeDemo(d);
         void takeDemo(Demo demo) {
         demo = null;
         demo = new Demo();
         }

    Hey flounder, I am myself confused about garbage collection and assertions (yesterday)... Anyway because of ur interest in answering my query, I'll give one more try... But, if it's wrong, Please help me out.
    The Demo (not demo) object created at line 4 has one 'this' reference on the next line. And as soon as this reference is eleigible, I guess even Demo d will be eligible. Correct?

  • When will garbage will be collected ?

    hi,
    when will garbage will be collected if our class contains static methods and non static methods.
    when it will exactly happen
    thanks in advance.
    regards
    srinivas.

    That is what I am trying to figure out, when are there
    no more references to it based on what i have
    described? As I mentioned, the Thread is added to a ThreadGroup when it is created. In your case the thread can be cleaned up when the Threads has been removed from the ThreadGroup.
    I'm not really sure. Won't there need to be a new thread per request, If you can use one thread to send all the replies (which also need to be serialised) what is special about the requests that they need their own threads. How is the serialization of the requests so fundermentaly different?
    otherwise how will the thread get the object to be serialized,I don't see how the objects are serialized and how you use your threads are releated???
    or is a setRequest(someRequest) on the thread from the model OK to do.I would use another thread that the GUI thread to send requests and recieve replies.
    I was somewhat leery of calling a setter from the model on an already running thread. I would call the setter for the GUI thread.
    How you do this is:
    - Read reply using the thread reading replies.
    - Add a Runnable to the GUI Thread to set the values via SwingUtilities.invokeLater()

  • WLS not garbage collecting enough?

    WLS 5.1 SP5
    SunOS 5.6 (2.6)
    JDK 1.2.2_005a (with the JVMARGS directive set as per BEA's docs. The
    JVMARGS directive solved the SIGBUS 10 for us when requesting the
    AdminMain servlet)
    We tried some stress testing of our web app by running about 100 to 200
    virtual clients requesting the same URL (servlet that forwards to a
    JSP). These virtual clients are actually Java threads running
    simultaneously.
    After each test, we notice that, via WL console, the heap usage of WL
    increased. However, after leaving WL server by itself (no HTTP requests
    coming to it) for a long time (say 30 minutes to 1 hour), we noticed
    that the heap usage has not gone down, except for about 1%. As soon as
    we explicitly tell WLS to garbage collect via the WL console, then the
    heap usage goes down ... sometimes even as low as just 10% when we tell
    it to gc again just after a gc a few seconds earlier.
    Is this proper behaviour by WLS? ... or does this have something to do
    with the JVMARGS directive? Why doesn't it gc even after a long time?
    Thanks in advance,
    John Salvo
    Homepage: http://homepages.tig.com.au/~jmsalvo/

    There are a number of problems with memory usage and garbage collection. Going to WLS 5.1 will fix
    some of them. You should also consider having your application call System.runFinalization(); and
    System.gc() from time to time.
    Mike
    "Jim Zhou" <[email protected]> wrote:
    I see the same behavior in my stress test/pre-production run. I think it's
    normal behavior. The GC will kick in when the heap size gets 100%, you might
    see a pause in your WLS because all threads will stop for the GC ( you
    should see CPU really busy when GC is in ). JDK 1.2 should have better GC
    algorithm than JDK 1.1. Usually for people still using JDK1.1.x, tuning the
    heap size for tolerable GC pause is a pain., the tuning guide want you to
    run multiple WLS instances in a box to stagger the effects of GC pause. If
    you use JDK 1.2, you probably set your heap size comparable to your box's
    memory.
    In one of my stress test, I set heap size to 256m, I see on my console the
    heap gets full every 30 seconds, and it take 1 or 2 seconds to GC. But if
    your heap is 2G, it might take longer.
    WLS 4.51 SP11
    Solaris 2.6
    JDK 1.2.2_06.
    Regards,
    Jim Zhou.
    Jesus M. Salvo Jr. <[email protected]> wrote in message
    news:[email protected]...
    WLS 5.1 SP5
    SunOS 5.6 (2.6)
    JDK 1.2.2_005a (with the JVMARGS directive set as per BEA's docs. The
    JVMARGS directive solved the SIGBUS 10 for us when requesting the
    AdminMain servlet)
    We tried some stress testing of our web app by running about 100 to 200
    virtual clients requesting the same URL (servlet that forwards to a
    JSP). These virtual clients are actually Java threads running
    simultaneously.
    After each test, we notice that, via WL console, the heap usage of WL
    increased. However, after leaving WL server by itself (no HTTP requests
    coming to it) for a long time (say 30 minutes to 1 hour), we noticed
    that the heap usage has not gone down, except for about 1%. As soon as
    we explicitly tell WLS to garbage collect via the WL console, then the
    heap usage goes down ... sometimes even as low as just 10% when we tell
    it to gc again just after a gc a few seconds earlier.
    Is this proper behaviour by WLS? ... or does this have something to do
    with the JVMARGS directive? Why doesn't it gc even after a long time?
    Thanks in advance,
    John Salvo
    Homepage: http://homepages.tig.com.au/~jmsalvo/

  • Animation gets slow when program needs a Garbage Collect.

    So nonetheless, I should probably develop a new animation algorithm, yes?
    I am looping through a seperate thread that calls the setSize() methods a bunch of times. Works really nice when memory isnt bad, but when I need to garbage collect, and apparantly java doesnt agree, it gets really slow. Later one is really able to see when a GC is actually done, and it goes back to normal.
    Here is my algorithm,
    public static boolean raisePanel(final VCMSComponentFrame p, final boolean anim)
            if (p.getState() == VCMSComponentFrame.State.RAISED ||
                p.getState() == VCMSComponentFrame.State.ANIMATING)
                return false;
            new Thread(new Runnable()
                public void run()
                    p.setState(VCMSComponentFrame.State.ANIMATING);
                    if (anim)
                        for (int i = p.getHeight(); i <= FULL_PANEL_HEIGHT; i++)
                            try
                                p.setSize(p.getWidth(), i);
                                JComponent parent = (JComponent)p.getParent();
                                int index = findIndex(p);
                                for (int j = index + 1; j < parent.getComponentCount() && j != 0; j++)
                                     parent.getComponent(j).setLocation(parent.getComponent(j).getX(), parent.getComponent(j).getY() + 1);
                                //Viewport Panel
                                parent.setSize(parent.getWidth(), parent.getHeight() + 1);
                                //Structure Frame
                                VCMSStructurePanel panel = (VCMSStructurePanel)parent.getParent();
                                parent.getParent().setSize(panel.getWidth(), panel.getHeight() + 1);
                                //Structure Siblings.
                                JPanel master = (JPanel)panel.getParent();
                                index = findStructureIndex(panel);
                                for (int j = index + 1; j < master.getComponentCount() && j != 0; j++)
                                    master.getComponent(j).setLocation(master.getComponent(j).getX(), master.getComponent(j).getY() + 1);
                                Thread.sleep(1);
                            catch (Exception ex)
                    else
                        p.setSize(p.getWidth(), FULL_PANEL_HEIGHT);
                        JPanel parent = (JPanel)p.getParent();
                        int index = findIndex(p);
                        //Viewport Panel
                        parent.setSize(parent.getWidth(), parent.getHeight() + FULL_PANEL_HEIGHT - SHORT_PANEL_HEIGHT);
                        //Structure Frame
                        VCMSStructurePanel panel = (VCMSStructurePanel)parent.getParent();
                        parent.getParent().setSize(panel.getWidth(), panel.getHeight() + FULL_PANEL_HEIGHT - SHORT_PANEL_HEIGHT);
                        //Component Siblings
                        for (int j = index + 1; j < parent.getComponentCount() && j != 0; j++)
                            parent.getComponent(j).setLocation((int)parent.getComponents()[j].getLocation().getX(), (int)parent.getComponents()[j].getLocation().getY() + FULL_PANEL_HEIGHT - SHORT_PANEL_HEIGHT);
                        //Structure Grandparent
                        JPanel master = (JPanel)panel.getParent();
                        index = findStructureIndex(panel);
                        for (int j = index + 1; j < master.getComponentCount() && j != 0; j++)
                            master.getComponent(j).setLocation((int)master.getComponent(j).getLocation().getX(), (int)master.getComponent(j).getLocation().getY() + FULL_PANEL_HEIGHT - SHORT_PANEL_HEIGHT);
                    p.setState(VCMSComponentFrame.State.RAISED);
            }).start();
            //System.gc();
            return true;
        }any help appreciated!

    sierratech wrote:
    Only a guess, but this may have something to do with Threads and Swing.
    http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html.
    Many Swing updates should be called in the Event Dispatch thread, and it looks like you may be calling some of these in your new Thread.
    Try using SwingUtilities.invokeLater() and see if that helps. Alternatively, rewrite your code to remove the Thread and do everything in the event Dispatch thread using javax.swing.Timer. Again, just a guessThanks for the Idea, but this option doesnt even show the animation.
    One Idea I got from a "Swing Hacks" directory works like this:
    Remove the components for animation.
    Create an image of the components.
    Overide the Paint method.
    Animate the images via paint method.
    Remove the images.
    Add back the components.
    But I look at that and my stomach cringes.
    Any other Ideas?

  • When does garbage collection occur?

    Answer the question!
    thanks

    Sometime after a objects become unreachable and before the memory allocator runs out of memory, the garbage collector will run. You have no way of controlling or knowing when that will be. There is no reason to.
    For some reason, even though many programming languages have garbage collection, people seem to regard Java's garbage collection as something they need to "understand" and control. Garbage collection is best left up to the garbage collector -- that's its job, and just let it work.

  • How to Change the Garbage Collection Algorithm in WLS 9..2

    Hi All
    I am trying to find out the way to configure the GC algorithm in weblogic 9.2 to type bea.Jmapi.GarbageCollector@.
    By default it is showing ‘Nursery, parallel mark, parallel sweep’ . We were trying to change it to generational (two-spaced) with a parallel mark algorithm and a concurrent sweep algorithm or bea.Jmapi.GarbageCollector .
    To change the same I modified the memory argument in commenv.cmd to set MEM_ARGS=-Xms128m -Xmx256m -XXsetGC:genparcon
    Still Garbage Collection Statistics section in web logic console shows the same default value.
    Could anyone tell me if I am missing something?
    thanks in advance

    There is nothing is WebLogic that will define the JVM GC algorithm, that is up to the JVM settings that are normally configured using params in the start scripts.
    If you are using JRockit, you can ask in the forums but the JVM documentation should really be sufficient.
    JRockit
    Same thing for the Sun JVM, there is lots of information out there on how to change the GC algorithm.
    The thing that is nice about JRockit is that you can use the Mission Control tooling to take recordings, look at the GC's and make adjustments easily. Sun has some tooling as well with jvmstat (and visualgc), but I'm not as familiar with it.
    http://java.sun.com/performance/jvmstat/
    Both of those tools would be much preferred to printing the GC info to a file and trying to parse it in my opinion.

Maybe you are looking for

  • Please help with an sql to show more than one records into single row for each student

    From the following data I would like to create an sql to get the information  as the following layout studentid,  firstTerm,  EnglishMark1,ScienceMark1,MathsMark1, Secondterm,EnglishMark2,ScienceMark2,MathsMark2, ThirdTerm,EnglishMark3,ScienceMark3,M

  • PROBLEM WITH DIGITAL EDITIONS

    Hi, I've always encountered this problem with digital editions: Adobe Digital Editions 2.0 has encountered a problem and needs to close.  We are sorry for the inconvenience. I'm using Windows XP pro 2002, service pack2  on an old computer AMD Duron 9

  • How to do Customer document Reversals

    Hi... My user created a report for customer incoming payment according to their requirement which will show each bill wise. Now my problem is when they received money from the customer instead of entering one outstanding payment they entered another

  • Which Soundcard should i buy for Musicproduction on new iMac ?

    Hi, I'm planning to buy a new 20" iMac Intel. The main use will be Music Production as in Home Recording Studio. My question is for reasons of Budgeting. I'm now a Windows user and for music production I use Steinberg System 4 which includes the Stei

  • HT2619 is it possible to convert a mp3 file in a text?

    is it possible to convert a mp3 file in a text in final cut?