[
https://issues.apache.org/jira/browse/HBASE-11520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14065419#comment-14065419
]
stack commented on HBASE-11520:
-------------------------------
bq. lruCache.setVictimCache is called only when bucketCacheIOEngineName != null
&& bucketCacheSize > 0.
... and combinedWithLru is not set, yeah.
bq. combinedWithLru is used to size the lrucache based on the value of
bucketCacheSize, calculated from hbase.bucketcache.size.
No. Not in the last version of this patch. LruBC size is detached from
bucketCacheSizing.
bq. So setting hbase.bucketcache.combinedcache.enabled=false,
hbase.bucketcache.ioengine not null .... with a victimCache set but no way to
access the blocks from the bucketcache.
No (as per your later comment).
bq. Setting bucketCacheIOEngineName != null && bucketCacheSize > 0 but
hbase.bucketcache.combinedcache.enabled=false results in
GLOBAL_BLOCK_CACHE_INSTANCE=LruBlockCache and a surprising amount of wasted
memory.
The bucket cache will be set into LruBC as victimHandler.
bq. So really, setting hbase.bucketcache.combinedcache.enabled=false means
"cache data blocks in Lru first" while =true means "data blocks never go to
lru, only bucket".
Yeah. Seems like a simple story to tell. You ok w/ it? Let me write up the
L1+L2 deploy type in case folks interested and put in manual. Let me see if I
can test too. Probably would be better with a policy in place that loaded data
blocks to L2 first and only up into L1 if accessed a few times rather than as
it is, loading to L1 always and then to L2.
The unit tests added to TestCacheConfig try to confirm that these deploy
options are layed-out as we expect.
Thanks for looking.
> Simplify offheap cache config by removing the confusing
> "hbase.bucketcache.percentage.in.combinedcache"
> -------------------------------------------------------------------------------------------------------
>
> Key: HBASE-11520
> URL: https://issues.apache.org/jira/browse/HBASE-11520
> Project: HBase
> Issue Type: Sub-task
> Components: io
> Affects Versions: 0.99.0
> Reporter: stack
> Assignee: stack
> Fix For: 0.99.0, 2.0.0
>
> Attachments: 11520.txt, 11520v2.txt, 11520v3.txt, 11520v3.txt
>
>
> Remove "hbase.bucketcache.percentage.in.combinedcache". It is unnecessary
> complication of block cache config. Let L1 config setup be as it is whether
> a L2 present or not, just set hfile.block.cache.size (not
> hbase.bucketcache.size * (1.0 -
> hbase.bucketcache.percentage.in.combinedcache)). For L2, let
> hbase.bucketcache.size be the actual size of the bucket cache, not
> hbase.bucketcache.size * hbase.bucketcache.percentage.in.combinedcache.
> Attached patch removes the config. and updates docs. Adds tests to confirm
> configs are as expected whether a CombinedBlockCache deploy or a strict L1+L2
> deploy.
--
This message was sent by Atlassian JIRA
(v6.2#6252)