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

Utilising BTree Improvements

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Patch Available
    • Priority: Normal
    • Resolution: Unresolved
    • Fix Version/s: 4.x
    • Component/s: Local/Other
    • Labels:
      None
    • Change Category:
      Performance
    • Complexity:
      Normal
    • Platform:
      All
    • Impacts:
      None
    • Test and Documentation Plan:
      Hide

      AtomicBTreePartitionUpdateBench included. Some unit tests to come.

      Show
      AtomicBTreePartitionUpdateBench included. Some unit tests to come.

      Description

      This patch utilises CASSANDRA-15510 to improve throughput and reduce garbage produced by a number of common operations, by employing transformAndFilter, transform and FastBuilder

      • Row, Cell and ComplexColumnData cloning are implemented with BTree.transform, so no special builders are necessary;
        • Rows.copy removed
      • Rows.merge implemented using BTree.update and a ColumnData reconciler
        • Zero-allocations if result of merge is same as existing
        • Fewer comparisons
      • ColumnData reconciler implemented in same manner
        • Cells.reconcileComplex is retired
        • ComplexColumnData reconciliation now
          • Garbage-free if the merge has no effect
          • Always fewer allocations
          • Fewer comparisons
      • FastBuilder employed widely:
        • ClusteringIndexNamesFilter deserialization
        • Columns deserialization
        • PartitionUpdate deserialization
        • AbstractBTreePartition construction
        • Misc others

      The upshot of this work when combined with the proposed patch for CASSANDRA-15367 has a dramatic impact on operations over collection types - under contention, as much as 100x improved throughput, and hundreds of megabytes of reduced allocations. For all operations, allocations under contention and no contention are significantly reduced and throughput improved.

        Attachments

        1. atomicbtreepartition.ods
          831 kB
          Benedict Elliott Smith
        2. perfsh.tar.gz
          2 kB
          Benedict Elliott Smith
        3. atomicbtreepartition.xlsx.zip
          863 kB
          Benedict Elliott Smith

          Issue Links

            Activity

              People

              • Assignee:
                benedict Benedict Elliott Smith
                Reporter:
                benedict Benedict Elliott Smith
                Authors:
                Benedict Elliott Smith
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: