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

Lower memory consumption used by index sampling

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 1.1.0
    • None

    Description

      currently j.o.a.c.io.sstable.indexsummary is implemented as ArrayList of KeyPosition (RowPosition key, long offset)i propose to change it to:

      RowPosition keys[]
      long offsets[]

      and use standard binary search on it. This will lower number of java objects used per entry from 2 (KeyPosition + RowPosition) to 1 (RowPosition).

      For building these arrays convenient ArrayList class can be used and then call to .toArray() on it.

      This is very important because index sampling uses a lot of memory on nodes with billions rows

      Attachments

        1. cassandra-3743-codestyle.txt
          11 kB
          Radim Kolar
        2. 3743-trunk.txt
          12 kB
          Yuki Morishita
        3. 3743-trunk-trim.txt
          11 kB
          Jonathan Ellis
        4. 3743-trunk-v2.txt
          11 kB
          Yuki Morishita

        Activity

          People

            hsn Radim Kolar
            hsn Radim Kolar
            Radim Kolar
            Yuki Morishita
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: