You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "stack (JIRA)" <ji...@apache.org> on 2010/07/22 22:13:56 UTC

[jira] Commented: (HBASE-2663) LRU cache makes needless datastructure copies during eviction

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

stack commented on HBASE-2663:
------------------------------

What you thinking?  A PriorityDequeue?  An implementation is not easy to come by.  It'd be less performant keeping sort up on both ends.  I wonder if we just used a NavigableSet, if that'd be performant enough.  We'd have to change the compare to take into consideration priority.

> LRU cache makes needless datastructure copies during eviction
> -------------------------------------------------------------
>
>                 Key: HBASE-2663
>                 URL: https://issues.apache.org/jira/browse/HBASE-2663
>             Project: HBase
>          Issue Type: Improvement
>          Components: regionserver
>            Reporter: Todd Lipcon
>
> Was browsing the LRU eviction code and came upon some very inefficient code. When we do eviction, BlockBucket.free() calls queue.get() which first inserts everything from the PriorityQueue<Block> into a LinkedList, then copies that entire linked list into an array. We then iterate over usually just a small percentage of the array to free some blocks until we have freed the requested amount.
> We ought to be able to just pull items out of the PriorityQueue directly and avoid all the churn.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.