Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-3051

Fix MessageReferenceImpl::getMemoryEstimate

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.16.0
    • 2.17.0
    • None
    • None

    Description

      MessageReferenceImpl::memoryOffset is used on MessageReferenceImpl::getMemoryEstimate: it reports 64 bytes.

      https://github.com/openjdk/jol is reporting 72 bytes for OpenJDK 64 bit using COOPS and 8 bytes alignment, that's very common, and that's a more accurate estimated footprint value.

      To be honest, a full-fat 64 bit JVM would use 112 bytes instead, but that could be improved in a bigger follow-up PR using JOL on the test suite to double check footprint.

       

      The interesting thing is that paging will be positively affected by this change, because the broker won't under-estimate the memory footprint of many references, triggering paging sooner.

       

      Attachments

        Issue Links

          Activity

            People

              nigrofranz Francesco Nigro
              nigrofranz Francesco Nigro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h