Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
Reviewed
Description
In HBASE-22483, we saw that the BucketCacheWriter thread was quite busy [^BucketCacheWriter-is-busy.png], the flame graph also indicated that the ByteBufferArray#internalTransfer cost ~6% CPU (see async-prof-pid-25042-cpu-1.svg). because we used the hbase.ipc.server.allocator.buffer.size=64KB, each HFileBlock will be backend by a MultiByteBuff: one 64KB offheap ByteBuffer and one small heap ByteBuffer.
The path is depending on the MultiByteBuff#get(ByteBuffer, offset, len) now:
RAMQueueEntry#writeToCache |--> ByteBufferIOEngine#write |--> ByteBufferArray#internalTransfer |--> ByteBufferArray$WRITER |--> MultiByteBuff#get(ByteBuffer, offset, len)
While the MultiByteBuff#get impl is simple and crude now, can optimze this implementation:
@Override public void get(ByteBuffer out, int sourceOffset, int length) { checkRefCount(); // Not used from real read path actually. So not going with // optimization for (int i = 0; i < length; ++i) { out.put(this.get(sourceOffset + i)); } }
Attachments
Attachments
Issue Links
- relates to
-
HBASE-22387 Evaluate the get/scan performance after reading HFile block into offheap directly
- Closed
-
HBASE-22483 It's better to use 65KB as the default buffer size in ByteBuffAllocator
- Closed
- links to