[ 
https://issues.apache.org/jira/browse/HBASE-14727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15083777#comment-15083777
 ] 

stack commented on HBASE-14727:
-------------------------------

Thanks for the patch. More metrics is generally better. We just have to be 
parsimonious when we add them making sure no overlap else we can confuse. 
Metrics also need good explaination on what the metric is about. Here's some 
questions (thanks for adding comments in pb.. .helps):

149       /** the size of cache for the region */
150       optional uint64 cache_size = 22;

What is a region cache size? We usually do the cache by regionserver, not by 
region. Is this the amount of the cache occupied by the region summing the size 
of all the cached blocks for a region? Is so, tighten the comment/description 
I'd say.

Do we need this:

143       /** the number of cache miss count for the region */
144       optional uint64 cache_miss_count = 20;

We have the cache hit number and elsewhere we have overall hits so miss would 
be the difference? Do we need to send this one over?

I think we do this elsewhere but that doesn't mean it a good idea (smile):

155       /** the current cache hit ratio for the region */
156       optional float cache_hit_ratio = 24;

The above can be calculated from cache hit rate or overall hit rate

... but this latter might be ok.

Adding the above numbers to UI is great. Thanks.

When you add region to BlockCacheKey, is it the name or the id that you use? It 
looks like the name given you are parsing the file path. The file path will not 
always have the region id in it (it won't in hbase 2.0.0). Do you have to get 
it from the filepath?

What does the CacheStatsChore do? Why we need it now?

Thanks. This is a welcome patch. Just a few items above.




> Add block cache stats for regions
> ---------------------------------
>
>                 Key: HBASE-14727
>                 URL: https://issues.apache.org/jira/browse/HBASE-14727
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Eungsop Yoo
>            Priority: Minor
>         Attachments: HBASE-14727-v1.patch, HBASE-14727-v2.patch, 
> HBASE-14727-v3.patch, HBASE-14727-v4.patch, HBASE-14727.patch, 
> rs-web-ui-v2.png
>
>
> The stats of block cache are calculated at region server level only. So at 
> region level, we could not know about the numbers of blocks cached, the sizes 
> of cached blocks, the numbers of cache hit, etc. I suggest to add the stats 
> of block cache at region level.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to