glassfish
  1. glassfish
  2. GLASSFISH-12242

[UB]Document the usefulness of -XX:+DisableExplicitGC as a JVM option

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: v2.1.1
    • Fix Version/s: 3.1.1
    • Component/s: docs
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      12,242

      Description

      System.gc() can be a huge performance problem, especially when called by a 3rd party library. Adding -XX:+DisableExplicitGC to the
      default JVM options would help avoid problems with extra System.gc() calls. There may be a drawback to turning on this option on
      Windows because of dangling open files, as described by Tim Quinn in this forum thread:
      http://forums.java.net/jive/thread.jspa?messageID=473951. So consider just making the option a default for non-Windows platforms.

      This is actually referred to in the performance tuning guide, but without any notes about the possible windows issue with it.
      http://docs.sun.com/app/docs/doc/819-3681/abeih?l=en&a=view&q=disableexplicitgc

        Activity

        Hide
        Scott Fordin added a comment -

        Will add issue to 3.1 Performance Tuning Guide, but there seems to be some disagreement here about what needs to be said. Can someone please provide further clarification?

        Show
        Scott Fordin added a comment - Will add issue to 3.1 Performance Tuning Guide, but there seems to be some disagreement here about what needs to be said. Can someone please provide further clarification?
        Hide
        Scott Fordin added a comment -

        This option is mentioned in the 3.1 Performance Tuning Guide, as it was in the 9.1 PTG referenced in this issue. See http://download.oracle.com/docs/cd/E18930_01/html/821-2431/abeic.html#abeih. To save you the click, here's what we have in the 3.1 PTG:

        ------------------------------- Snip -------------------------------
        Although applications can explicitly invoke GC with the System.gc() method, doing so is a bad idea since this forces major collections, and inhibits scalability on large systems. It is best to disable explicit GC by using the flag -XX:+DisableExplicitGC.
        ------------------------------- Snip -------------------------------

        Is there something else you'd like said here? If so, as stated in my previous comment, can someone please clarify? If there's nothing else that needs to be said, can this issue be closed?

        Show
        Scott Fordin added a comment - This option is mentioned in the 3.1 Performance Tuning Guide, as it was in the 9.1 PTG referenced in this issue. See http://download.oracle.com/docs/cd/E18930_01/html/821-2431/abeic.html#abeih . To save you the click, here's what we have in the 3.1 PTG: ------------------------------- Snip ------------------------------- Although applications can explicitly invoke GC with the System.gc() method, doing so is a bad idea since this forces major collections, and inhibits scalability on large systems. It is best to disable explicit GC by using the flag -XX:+DisableExplicitGC. ------------------------------- Snip ------------------------------- Is there something else you'd like said here? If so, as stated in my previous comment, can someone please clarify? If there's nothing else that needs to be said, can this issue be closed?
        Hide
        Scott Fordin added a comment -

        Reassigning to Paul Davies.

        Show
        Scott Fordin added a comment - Reassigning to Paul Davies.
        Hide
        Paul Davies added a comment -

        The fix entails adding a note about a possible drawback of using this option on Windows systems. A file that contains this fix is attached. The fix will be published in the next library update.

        Show
        Paul Davies added a comment - The fix entails adding a note about a possible drawback of using this option on Windows systems. A file that contains this fix is attached. The fix will be published in the next library update.
        Hide
        Paul Davies added a comment -

        Deleted 3-1_need_more_info tag

        Show
        Paul Davies added a comment - Deleted 3-1_need_more_info tag

          People

          • Assignee:
            Paul Davies
            Reporter:
            Jim Cullison
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: