Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 359BE19ACD for ; Sat, 16 Apr 2016 23:28:26 +0000 (UTC) Received: (qmail 48600 invoked by uid 500); 16 Apr 2016 23:28:25 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 48562 invoked by uid 500); 16 Apr 2016 23:28:25 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 48551 invoked by uid 99); 16 Apr 2016 23:28:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Apr 2016 23:28:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 885D02C1F5A for ; Sat, 16 Apr 2016 23:28:25 +0000 (UTC) Date: Sat, 16 Apr 2016 23:28:25 +0000 (UTC) From: "Benedict (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-11452) Cache implementation using LIRS eviction for in-process page cache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-11452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15244465#comment-15244465 ] Benedict commented on CASSANDRA-11452: -------------------------------------- One more variant for you: instead of random admission, with a similar (or slightly higher) rate, walk an LRU order iterator one step and use the next key's frequency. After each step, reset the iterator with a 1% chance. Basically it's the same as random admission but without its blindness. Could have a bound on frequency, but could be very low, perhaps just 3 to ignore 100% no doubt legit rejections. Not suggesting you go and do it, just wanted to note it for posterity as I think it's approximately optimal. Only risk is if your finger gets referenced and bumped to MRU, which could be guarded against. bq. Thanks a lot for all your help on this =) My pleasure - this is my idea of fun. > 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)