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

RandomAccessReader does not override skip or skipBytes so will do a lot of disk io when n is large

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Review In Progress
    • Normal
    • Resolution: Unresolved
    • None
    • Local/SSTable
    • None
    • Performance
    • Low Hanging Fruit
    • All
    • None
    • Hide
      PR tests
      link link

      In my testing, the following cases improve by relying on seek:

      1) compressed data (avoid decompressing when not needed)
      2) non-mmap data (avoid the extra extra io)

      The cases which did not improve noticeably (but also did not regress):

      1) mmap data which is in the page cache (mmap rebuffer doesn’t copy into buffers, instead switches the position of the buffer. This patch lowers the amount of times we update the buffer position)

      Plan to run stress tests as well, but still learning the Data.db read path to figure out which patterns call .skipByte*

      Show
      PR tests link link In my testing, the following cases improve by relying on seek: 1) compressed data (avoid decompressing when not needed) 2) non-mmap data (avoid the extra extra io) The cases which did not improve noticeably (but also did not regress): 1) mmap data which is in the page cache (mmap rebuffer doesn’t copy into buffers, instead switches the position of the buffer. This patch lowers the amount of times we update the buffer position) Plan to run stress tests as well, but still learning the Data.db read path to figure out which patterns call .skipByte*

    Description

      RandomAccessReader does not override skip or skipBytes which becomes a problem when the size of n (the bytes to skip) is larger than a single buffer; in these cases we can rely on seek to avoid the extra disk io.

      Attachments

        1. Histogram-3.png
          157 kB
          David Capwell

        Activity

          People

            Unassigned Unassigned
            dcapwell David Capwell
            Dinesh Joshi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: