[ 
https://issues.apache.org/jira/browse/HBASE-26681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yutong Xiao updated HBASE-26681:
--------------------------------
    Description: 
In branch-1, BucketCache just allocate new onheap bytebuffer to construct new 
HFileBlock when get cached blocks. This rough allocation increases the GC 
pressure for those "hot" blocks. 
Here introduce a RAMBuffer for those "hot" blocks in BucketCache. The thought 
is simple. The RAMBuffer is an timeout expiring cache. When a Multi-level block 
is read twice, we cache it in the RAMBuffer. When the block timeout in the 
cache (e.g. 60s), that means the block is not being accessed in 60s, we evict 
it. Not like LRU, we do not cache block when the whole RAMBuffer size reaches 
to a threshold (to fit different workload, the threshold is dynamic). This will 
prevent the RAMBuffer from being churned.

I first did a YCSB test to check the performance of RAMBuffer with its hit 
ratio is 100%. The result is:

 
{panel:title=My title}
!Hit 100%.png!
{panel}


  was:
In branch-1, BucketCache just allocate new onheap bytebuffer to construct new 
HFileBlock when get cached blocks. This rough allocation increases the GC 
pressure for those "hot" blocks. 
Here introduce a RAMBuffer for those "hot" blocks in BucketCache. The thought 
is simple. The RAMBuffer is an timeout expiring cache. When a Multi-level block 
is read twice, we cache it in the RAMBuffer. When the block timeout in the 
cache (e.g. 60s), that means the block is not being accessed in 60s, we evict 
it. Not like LRU, we do not cache block when the whole RAMBuffer size reaches 
to a threshold (to fit different workload, the threshold is dynamic). This will 
prevent the RAMBuffer from being churned.

I first did a YCSB test to check the performance of RAMBuffer with its hit 
ratio is 100%. The result is:
!Hit 100%.png!
 


> Introduce a little RAMBuffer for bucketcache to reduce gc and improve 
> throughput
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-26681
>                 URL: https://issues.apache.org/jira/browse/HBASE-26681
>             Project: HBase
>          Issue Type: Improvement
>          Components: BucketCache, Performance
>            Reporter: Yutong Xiao
>            Assignee: Yutong Xiao
>            Priority: Major
>             Fix For: 1.7.2
>
>         Attachments: Hit 100%.png
>
>
> In branch-1, BucketCache just allocate new onheap bytebuffer to construct new 
> HFileBlock when get cached blocks. This rough allocation increases the GC 
> pressure for those "hot" blocks. 
> Here introduce a RAMBuffer for those "hot" blocks in BucketCache. The thought 
> is simple. The RAMBuffer is an timeout expiring cache. When a Multi-level 
> block is read twice, we cache it in the RAMBuffer. When the block timeout in 
> the cache (e.g. 60s), that means the block is not being accessed in 60s, we 
> evict it. Not like LRU, we do not cache block when the whole RAMBuffer size 
> reaches to a threshold (to fit different workload, the threshold is dynamic). 
> This will prevent the RAMBuffer from being churned.
> I first did a YCSB test to check the performance of RAMBuffer with its hit 
> ratio is 100%. The result is:
>  
> {panel:title=My title}
> !Hit 100%.png!
> {panel}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to