Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6595845

Java 6 JavaWebstart increases footprint by factor 2

XMLWordPrintable

    • 6
    • b65
    • x86
    • windows_xp
    • Verified

        Customer reported that using JWS 6u1 increases footprint of their
        application by factor 2.

        The application was only started up and some initial but identical
        functions were called.

        Customer used the following setup:

        Application AgreeBAP 3.2 (customer's application)
        JRE 6u1

        When using JWS 6u1 on JRE 6u1 (default) to load the application, we have the
        following Java objects' footprint:
               #instances #bytes
         Total 1988354 107676864

        When using (as a diagnostic test) JWS 1.4.2_11 on JRE 6u1 to load the application,
        we have the following Java objects' footprint:
               #instances #bytes
         Total 825587 51769992

        Please note that in both cases JWS was running on JRE 6u1. So the only
        component that varied was JWS. Customer's application remained unchanged
        as well.

        Memory consumption of the application changed like follows:

        < totalMemory=62316544bytes \= 59,430MB
        < freeMemory=26646976bytes \= 25,413MB
        ---
        > totalMemory=133234688bytes \= 127,062MB
        > freeMemory=41470472bytes \= 39,549MB



        Looking into histograms gives:

        num #instances #bytes class name num #instances #bytes class name
        -------------------------------------- --------------------------------------
          1: 131730 13009576 [C | 1: 364708 40070096 [C
          2: 42319 4807904 <constMethodKlass> | 2: 105221 9778616 [Ljava.util.HashMap$Entry
          3: 9150 3647584 [I | 3: 366263 8790312 java.lang.String
          4: 42319 3387056 <methodKlass> | 4: 318200 7636800 java.util.HashMap$Entry
          5: 134691 3232584 java.lang.String | 5: 7434 5809336 [B
          6: 70516 2753528 <symbolKlass> | 6: 39657 4583280 <constMethodKlass>
          7: 5273 2592840 [B | 7: 105166 4206640 java.util.HashMap
          8: 4117 2293992 <constantPoolKlass> | 8: 39657 3173696 <methodKlass>
          9: 4117 1985904 <instanceKlassKlass> | 9: 109248 2701384 [I
         10: 3496 1294448 <constantPoolCacheKlass> | 10: 69414 2699248 <symbolKlass>
         11: 50941 1222584 java.util.HashMap$Entry | 11: 3861 2218800 <constantPoolKlass>
         12: 23546 1075024 [Ljava.util.HashMap$Entry; | 12: 3861 1885528 <instanceKlassKlass>
         13: 39960 959040 java.util.Hashtable$Entry | 13: 104183 1666928 java.util.jar.Attributes$Name
         14: 23519 940760 java.util.HashMap | 14: 98296 1572736 java.util.jar.Attributes
         15: 12709 622184 [Ljava.lang.Object; | 15: 3272 1230960 <constantPoolCacheKlass>
         16: 5379 511920 [S | 16: 15275 1222000 java.lang.reflect.Method
         17: 4661 447456 java.lang.Class | 17: 15480 710176 [Ljava.lang.Object;
         18: 1392 389232 [Ljava.util.Hashtable$Entry; | 18: 5056 498856 [S
         19: 11216 358912 java.lang.ref.SoftReference | 19: 4369 419424 java.lang.Class
         20: 4221 337680 java.lang.reflect.Method | 20: 10743 343776 java.lang.ref.SoftReference
         21: 20440 327040 java.util.jar.Attributes$Name | 21: 2895 324960 [Ljava.lang.String;
         22: 2676 317856 [Ljava.lang.String; | 22: 12283 294792 java.lang.ref.WeakReference
         23: 7043 299472 [[I | 23: 6539 279400 [[I
         24: 12326 295824 java.lang.ref.WeakReference | 24: 3782 242048 java.beans.PropertyDescriptor
         25: 18452 295232 java.util.jar.Attributes | 25: 14509 232144 java.util.HashMap$EntrySet
         26: 18423 294768 java.util.HashMap$EntrySet | 26: 7949 190776 java.util.LinkedList$Entry
         27: 3782 242048 java.beans.PropertyDescriptor | 27: 7778 186672 java.util.Hashtable$Entry
         28: 535 171200 <objArrayKlassKlass> | 28: 499 159680 <objArrayKlassKlass>
        [ ... ]

        Total 825587 51769992 | Total 1988354 107676864


        So, we have a threefold incease of objects of type [C : this account for 25 MB increase alone.
          1: 131730 13009576 [C | 1: 364708 40070096 [C

         a nearly threefold increase for objects of java.lang.String :
          5: 134691 3232584 java.lang.String | 3: 366263 8790312 java.lang.String

         a sixfold increase for objects of java.util.HashMap$Entry:
         11: 50941 1222584 java.util.HashMap$Entry | 4: 318200 7636800 java.util.HashMap$Entry

         a fourfold increase in for objects of [Ljava.util.HashMap$Entry :
         12: 23546 1075024 [Ljava.util.HashMap$Entry; | 2: 105221 9778616 [Ljava.util.HashMap$Entry

         however a nearly fivefold decrease for objects of java.util.Hashtable$Entry :
         13: 39960 959040 java.util.Hashtable$Entry 27: 7778 186672 java.util.Hashtable$Entry
        Identical bahviour was confirmed for Java 6u2.

              herrick Andy Herrick (Inactive)
              thlenz Thomas Lenz (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: