glassfish
  1. glassfish
  2. GLASSFISH-19012

[PERF] LoggerWeakRef objects largely increased frrom b39 to b45

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: 4.0
    • Component/s: logging
    • Labels:
      None
    • Environment:

      Glassfish:
      4.0 B45
      JDK:
      Java(TM) SE Runtime Environment (build 1.7.0-b147)
      Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
      OS:
      RHEL 5.0 64 bits

      Description

      PSR did performance study on memory footprint between GlassFish 4.0 B39 and GlassFish 4.0 B45 based on the following DevX scenario, using JDK 1.7. on a 64 bits RHEL 5.0 box:

      1) Start up the server
      2) Deploy a simple JSP "Hello world" application
      3) Access the JSP page
      From the Heap Dump we notice that the following class has the largest increase in number of objects instantiated as well as heap size:

      Shallow Heap comparsion between b45 to b39

      Class Name | Objects | Shallow Heap
      --------------------------------------------------------------------------------------------
      java.util.logging.LogManager$LoggerWeakRef | +6,313 | +505,040
      java.lang.ref.WeakReference | +6,454 | +309,792

      From the Heap dump, we observed that we are actually creating LESS loggers in b45 (261 objects) compare to b39 (281 objects), yet the amount of LoggerWeakRef is 10 times more. We are see a lot more nameLoggers being created.

        Activity

        Hide
        Tom Mueller added a comment -

        Sandeep, can you please provide an update on where we are with this issue. What changes are planned to address it? What is the timeframe for making these changes? How much improvement is expected in the memory footprint?

        Show
        Tom Mueller added a comment - Sandeep, can you please provide an update on where we are with this issue. What changes are planned to address it? What is the timeframe for making these changes? How much improvement is expected in the memory footprint?
        Hide
        Tom Mueller added a comment -

        This must be fixed for 4.0.

        Show
        Tom Mueller added a comment - This must be fixed for 4.0.
        Hide
        sandeep.shrivastava added a comment -

        I tried it again with the latest build.

        Started DAS.
        Launched Admin Console.
        Accessed test webapp #1
        Deployed test webapp #2
        Accessed test webapp #2
        GC and then heap dump

        It showed the following.

        Class names Instances % Size
        ===================================================================================================
        java.util.logging.LogManager$LoggerWeakRef 0.03828702924936467 676 (0%) 54,080 (0%)
        java.util.logging.LogManager$LogNode 0.03630471264621709 641 (0%) 25,640 (0%)
        java.util.logging.Logger 0.015745257590715055 278 (0%) 30,580 (0%)

        Scott - What numbers are you seeing in your test with the latest build?

        Show
        sandeep.shrivastava added a comment - I tried it again with the latest build. Started DAS. Launched Admin Console. Accessed test webapp #1 Deployed test webapp #2 Accessed test webapp #2 GC and then heap dump It showed the following. Class names Instances % Size =================================================================================================== java.util.logging.LogManager$LoggerWeakRef 0.03828702924936467 676 (0%) 54,080 (0%) java.util.logging.LogManager$LogNode 0.03630471264621709 641 (0%) 25,640 (0%) java.util.logging.Logger 0.015745257590715055 278 (0%) 30,580 (0%) Scott - What numbers are you seeing in your test with the latest build?
        Hide
        sandeep.shrivastava added a comment -

        The same use with Glassfish 3.1.2 has these figures.

        java.util.logging.LogManager$LogNode 678 (0.1%) 27,120 (0%)
        java.util.logging.LogManager$LoggerWeakRef 665 (0.1%) 53,200 (0.1%)
        java.util.logging.Logger 237 (0%) 26,070 (0%)

        I do not see a significant spike in the number of loggers or LoggerWeakRef instances. So closing this issue for now.

        Show
        sandeep.shrivastava added a comment - The same use with Glassfish 3.1.2 has these figures. java.util.logging.LogManager$LogNode 678 (0.1%) 27,120 (0%) java.util.logging.LogManager$LoggerWeakRef 665 (0.1%) 53,200 (0.1%) java.util.logging.Logger 237 (0%) 26,070 (0%) I do not see a significant spike in the number of loggers or LoggerWeakRef instances. So closing this issue for now.
        Hide
        sandeep.shrivastava added a comment -

        I am not seeing the memory spike after GC in the heap dumps taken across GF 3.1.2 and latest 4.0 builds.

        Show
        sandeep.shrivastava added a comment - I am not seeing the memory spike after GC in the heap dumps taken across GF 3.1.2 and latest 4.0 builds.

          People

          • Assignee:
            sandeep.shrivastava
            Reporter:
            matt_so
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: