Uploaded image for project: 'Pentaho Analysis - Mondrian'
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-1306

Memory monitor can be triggered before GC has cleaned up unused objects

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Severity: High
    • Resolution: Won't Fix
    • Affects Version/s: 3.5.0 GA (4.8.0 GA Suite Release)
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.

      Description

      NotificationMemoryMonitor uses MemoryPoolMXBean.setUsageThreshold() to define the memory threshold for triggering a notification. Based on the javadoc for MemoryPoolMXBean, I think usageThreshold is independent of whether GC has completed. There's another threshold that takes GC into account, though. MemoryPoolMXBean.setCollectionUsageThreshold() specifies a threshold to be checked after recycling unused objects.

      This blog post has a nice example of usage threshold vs. collection usage threshold: http://techblug.wordpress.com/2011/07/21/detecting-low-memory-in-java-part-2/

      Mondrian should switch to using the collection usage threshold so the JVM has a chance of reclaiming space and notifications aren't sent when there isn't really a memory issue.

        Attachments

          Activity

            People

            Assignee:
            inaumovic Ivana Naumovic (Inactive)
            Reporter:
            mattcampbell Matt Campbell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: