Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-5020

Time to switch back to byte[] internally?

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Normal
    • Resolution: Not A Problem
    • Fix Version/s: 2.2.0 beta 1
    • Component/s: None
    • Labels:

      Description

      We switched to ByteBuffer for column names and values back in 0.7, which gave us a short term performance boost on mmap'd reads, but we gave that up when we switched to refcounted sstables in 1.0. (refcounting all the way up the read path would be too painful, so we copy into an on-heap buffer when reading from an sstable, then release the reference.)

      A HeapByteBuffer wastes a lot of memory compared to a byte[] (5 more ints, a long, and a boolean).

      The hard problem here is how to do the arena allocation we do on writes, which has been very successful in reducing STW CMS from heap fragmentation. ByteBuffer is a good fit there.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tjake T Jake Luciani
                Reporter:
                jbellis Jonathan Ellis
                Authors:
                T Jake Luciani
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: