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

DecayingEstimatedHistogramReservoir Inefficiencies

    XMLWordPrintableJSON

Details

    • Degradation - Performance Bug/Regression
    • Low
    • Normal
    • Adhoc Test
    • All
    • None
    • Hide

      Existing microbenchmarks, new cluster benchmarks, quick theories tests

      Show
      Existing microbenchmarks, new cluster benchmarks, quick theories tests

    Description

      • LongAdder introduced to trunk consumes 9MiB of heap without user schemas, and this will grow significantly under contention and user schemas with many tables.  This is because LongAdder is a very heavy class designed for single contended values.  
        • This can likely be improved significantly, without significant loss of performance in the contended case, by simply increasing the size of our primitive backing array and providing multiple buckets, with each thread picking a bucket to increment, or simply multiple backing arrays.  Probably a better way still to do this would be to introduce some competition detection to the update, much like LongAdder utilises, that increases the number of backing arrays under competition.
        • To save memory this approach could partition the space into chunks that are likely to be updated together, so that we do not need to duplicate the entire array under competition.
      • Similarly, binary search is costly and a measurable cost as a share of the new networking work (without filtering it was > 10% of the CPU used overall).  We can compute an approximation floor(log2 n / log2 1.2) extremely cheaply, to save the random memory access costs.

      Attachments

        1. 15213-perf-branch
          209 kB
          Jordan West
        2. 15213-perf-trunk
          210 kB
          Jordan West

        Issue Links

          Activity

            People

              jwest Jordan West
              benedict Benedict Elliott Smith
              Jordan West
              Benedict Elliott Smith, Jordan West
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: