Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-14771

Change PrivateMetadata in OffHeap to use a flag for presence instead of 4 bytes for length

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 15.0.0.Final
    • 11.0.0.Final
    • Off Heap
    • None

      When private metadata was added it was added to off heap as an additional int written to the heap to designate how large it is. This is fine for the case when private metadata is present as we need to know how many bytes to read. However, many cases do not use private metadata causing those to store an additional 4 bytes per entry. While this may not seem like a lot it is an increase of 13 to 17 bytes per entry or almost a 33% increase in header size. This isn't as sizeable when eviction is enabled as it goes from 29 to 33, but it is still an an increase of 13.7%

      The proposal here is to reuse the metadata type byte in off heap to use one of the bit positions to designate the presence of internal metadata thus not requiring the 4 bytes in the cases when internal metadata isn't present.

              wburns@redhat.com Will Burns
              wburns@redhat.com Will Burns
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: