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

Close channel and reduce buffer allocation during entire sstable streaming with SSL

    XMLWordPrintableJSON

Details

    Description

      CASSANDRA-15740 added the ability to stream entire sstable by loading on-disk file into user-space off-heap buffer when SSL is enabled, because netty doesn't support zero-copy with SSL.

      But there are two issues:

      1. file channel is not closed.
      2. 1mb batch size is used. 1mb exceeds buffer pool's max allocation size, thus it's all allocated outside the pool and will cause large amount of allocations.

      Patch:

      1. close file channel when the last batch is loaded into off-heap bytebuffer. I don't think we need to wait until buffer is flushed by netty.
      2. reduce the batch to 64kb which is more buffer pool friendly when streaming entire sstable with SSL.

      Attachments

        Activity

          People

            jasonstack Zhao Yang
            jasonstack Zhao Yang
            Zhao Yang
            Caleb Rackliffe, Dinesh Joshi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: