Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-5557

CollectionResourceWrapper cache takes up large amounts of RAM

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.10.5
    • Fix Version/s: 1.11.2, 1.10.6
    • Component/s: Thresholding
    • Security Level: Default (Default Security Scheme)
    • Labels:

      Description

      On a customer machine, OpenNMS is failing after several days of operation. When we examine the heap dump, it appears that a lot of RAM is being consumed by the s_cache static cache inside CollectionResourceWrapper. This cache is used to store values so that thresholds can be evaluated as the collections occur.

      After investigating the cache variable, we found out that the entries in the cache are instances of an inner class that is NOT static. This is causing references to the outside object to leak into the cache. This greatly increases the retained size of the cache (probably by 10X) and is causing lots of garbage collection on the system. This is probably the primary cause of the performance problems. It would also cause similar performance problems on any system that is doing a lot of data collection (the customer machine is collecting roughly 90,000 individual metrics).

        Attachments

          Activity

            People

            • Assignee:
              seth Seth Leger
              Reporter:
              seth Seth Leger
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: