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

Ben Manes commented on CASSANDRA-11452:
---------------------------------------

Neither the original nor revised papers are clear about that. At first I used 
{{>=}} assuming it would be better, but in small traces the change made a 
[large 
difference|https://github.com/ben-manes/caffeine/commit/3e83411c670ca61a859f0e1ed24e216b847ccd58].
 That was prior to the window, so it may be less impactful now. The small 
traces are also very specific patterns, whereas the larger ones reflect 
real-world use, so that change might be even less noticeable. Another option 
might be to recycle the victim in the probation space or degrade to {{>=}} if 
we detect the clash. So basically I'd need to analyze it and play with your 
test (thanks!) to figure out a good strategy.

An idea that I've wanted to try is if we can detect miss predictions using a 
bloom filter. When a candidate is rejected it could be added to this sketch. If 
rejected again within the a shorter sample period, then we bypass TinyLFU. This 
might mean that the window is too small and could be dynamically sized based on 
the feedback. I think it would also help mitigate this collision.

I tried to protect the most likely attach by using a random seed, since I saw 
that degredation was possible. But making it more resilient is definitely worth 
while and your help here is great.

> Cache implementation using LIRS eviction for in-process page cache
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-11452
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11452
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Local Write-Read Paths
>            Reporter: Branimir Lambov
>            Assignee: Branimir Lambov
>
> Following up from CASSANDRA-5863, to make best use of caching and to avoid 
> having to explicitly marking compaction accesses as non-cacheable, we need a 
> cache implementation that uses an eviction algorithm that can better handle 
> non-recurring accesses.



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

Reply via email to