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

Shawn Heisey commented on SOLR-3393:
------------------------------------

Hoss, thanks for your comments.

Since I was the one who wrote the previous version of this, I just opted to 
completely replace LFUCache rather than go with a "Fast" appendage.  I hadn't 
considered the naming problem in quite the same light as "yet another fast*" 
name, but it did seem like a bad idea.

Yonik had the same concern about stats being preserved forever on SOLR-2906, 
and he helped with a decay option to deal with that.  I think the decay is a 
good idea.  There was only one kind of decay before, applied to all elements 
anytime there were evictions, defaulted to on.

In a new version of the patch for this issue (which I have not yet uploaded) I 
have now included two kinds of decay.  There is the kind applied at eviction, 
now defaulting to off, and one applied at warming, defaulting to on.  I will 
expand the documentation on the Wiki, making it clear that turning off the 
decay option will probably lead to an undesirable cache state.  Currently the 
decay is implemented with a bit shift (>>> 1), I may make another option 
available that just subtracts one, and we can bikeshed about which option 
should be default.

                
> Implement an optimized LFUCache
> -------------------------------
>
>                 Key: SOLR-3393
>                 URL: https://issues.apache.org/jira/browse/SOLR-3393
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>    Affects Versions: 3.6, 4.0
>            Reporter: Shawn Heisey
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: SOLR-3393.patch, SOLR-3393.patch
>
>
> SOLR-2906 gave us an inefficient LFU cache modeled on 
> FastLRUCache/ConcurrentLRUCache.  It could use some serious improvement.  The 
> following project includes an Apache 2.0 licensed O(1) implementation.  The 
> second link is the paper (PDF warning) it was based on:
> https://github.com/chirino/hawtdb
> http://dhruvbird.com/lfu.pdf
> Using this project and paper, I will attempt to make a new O(1) cache called 
> FastLFUCache that is modeled on LRUCache.java.  This will (for now) leave the 
> existing LFUCache/ConcurrentLFUCache implementation in place.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to