Eungsop Yoo created HBASE-30606:
-----------------------------------
Summary: Fix memory accounting of the row cache
Key: HBASE-30606
URL: https://issues.apache.org/jira/browse/HBASE-30606
Project: HBase
Issue Type: Sub-task
Reporter: Eungsop Yoo
Assignee: Eungsop Yoo
While reviewing the row cache implementation on the HBASE-29585 feature branch,
I found that the row cache can use more heap than configured or waste it.
# HeapMemoryManager does not count the row cache when it checks the heap limits
of the memstore and the block cache, so the heap memory tuner can grow them
into the heap reserved for the row cache.
# RowCells#heapSize and RowCacheKey#heapSize do not count the list of cells,
the array header of the row key and the map entry of the cache, so the cache
can hold more than row.cache.size.
# A row is cloned before its size is checked, so a row larger than the row
cache is cloned on every miss and evicted right away. The eviction policy
ignores sizes, so a large row can also evict many small rows at once.
Rows larger than 1% of the row cache are not cached. They are counted in the
new rowCacheTooLargeRowCount metric and logged at most once a minute.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)