Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-3374

Size estimate for AbstractBundlePersistenceManager.MISSING is too low

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.3, 2.1.2, 2.2, 2.3, 2.4, 2.5
    • 2.5.1
    • jackrabbit-core
    • None

    Description

      A heap dump from a Jackrabbit 2.2 based system recently showed that the ConcurrentCache of the bundle persistence managers used a lot more memory than configured. One of them used 10 times the configured bundle size.

      It turned out that the majority of the cache entries referenced AbstractBundlePersistenceManager.MISSING. The size estimate of 16 bytes is too low and does not account for the overhead that comes with the internal LinkedHashMap of the ConcurrentCache.

      I think a more sensible value is 128 bytes, which is the sum of:

      • 32 bytes for ConcurrentCache.E
      • 64 bytes for LinkedHashMap.Entry
      • 32 bytes for NodeId

      The unified cache, which also includes missing NodePropBundle entries was introduced with JCR-2699.

      Attachments

        1. JCR-3374.patch
          1 kB
          Marcel Reutegger

        Activity

          People

            Unassigned Unassigned
            mreutegg Marcel Reutegger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: