Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
Reviewed
-
Description
Running some scan profiling, flight recorder was mildly fingering resize of the buffer allocated in IPCUtil#buildCellBlock as a point of contention. It was half-hearted blaming it for a few hundreds of ms over a five minute sampling with a few tens of instances showing.
I tried then w/ flamegraph/lightweight profiler and this reported the buffer allocations taking 22% of our total CPU. See attachment trace.svg.
I enabled TRACE-level logging on org.apache.hadoop.hbase.ipc.IPCUtil and indeed every allocation was doing a resize from initial allocation of 16k – the default up to 220k (this test returns ten randomly sized rows zipfian sized between 0 and 8k).
Upping the allocation to 220k meant we now avoided the resize but the initial allocation was now blamed for 10% of allocations (see trace.2.svg attached).
Lets do buffer reuse. Will save a bunch of allocation and CPU.
Attachments
Attachments
Issue Links
- depends upon
-
HBASE-13188 java.lang.ArithmeticException issue in BoundedByteBufferPool.putBuffer
- Closed
- relates to
-
HBASE-13188 java.lang.ArithmeticException issue in BoundedByteBufferPool.putBuffer
- Closed
-
HBASE-13778 BoundedByteBufferPool incorrectly increasing runningAverage buffer length
- Closed