Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
Degradation - Resource Management
-
Normal
-
Normal
-
Code Inspection
-
All
-
None
-
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:
- file channel is not closed.
- 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.
- 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.
- reduce the batch to 64kb which is more buffer pool friendly when streaming entire sstable with SSL.