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

jar files causing higher memory bloat

XMLWordPrintable

    • sparc
    • solaris_8

      I am sure someone has hit this issue before:

      With all the class files in a jar file added to the classpath, the memory
      footprint is very high as compared to without jar files (only class files). I
      did some tests with the SwingSet Demo and here's the result:

      With rt.jar With jre/classes
      ========================================
      pmap 49488 40072
      (Private)

      pmap
      (Resident) 59992 50368

      The difference here is around 10MB which the size of the rt.jar file itself.
      Also, the Private memory size increases when the application is used (click on
      some tabs on the SwingSet demo).

      In ISV's application there are 5 jar files whose total size is 37MB (this
      includes jar files from third party like Orbix or Visiobroker etc.) With rt.jar
      and all other third party jars, the memory size grows to around 530MB. When we
      unjar all the jars, the memory reduces to around 230MB (around 50% better).
      Because of this all the system memory gets exhausted and system starts swapping
      - killing the performance.

      How does this jar mapping works? Does VM map individual classes (again) after
      mapping the jar file? Does GC unmap these classes when not required?(Although we
      don't see that happening).

      This is a serious issue as ISV cannot unjar the files either because of some
      problems with the tools that they use (like ClearCase for multiple views) or
      some vendors don't allow unjarring their jar files (like Visio Broker).

            foliversunw Fred Oliver (Inactive)
            rramchansunw Rajesh Ramchandani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: