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 B358B19F0E for ; Thu, 14 Apr 2016 09:23:30 +0000 (UTC) Received: (qmail 39278 invoked by uid 500); 14 Apr 2016 09:23:25 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 39244 invoked by uid 500); 14 Apr 2016 09:23: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 39229 invoked by uid 99); 14 Apr 2016 09:23:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Apr 2016 09:23:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7176B2C1F5A for ; Thu, 14 Apr 2016 09:23:25 +0000 (UTC) Date: Thu, 14 Apr 2016 09:23: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=15240856#comment-15240856 ] Benedict commented on CASSANDRA-11452: -------------------------------------- The simplest way would be to accept a hash function that at least operates over long values, which if not provided just returns the int, or possibly {{int | ((long)int << 32)}}. It would be nice if we could operate over larger values, but I don't think that's possible without negatively impacting Caffeine's footprint. We can also protect against the attack by simply comparing against a random member of the LRU for frequency in the LFU on admission, perhaps preferring (exponentially) candidates that are near to eviction, i.e. generating a number via an extreme value/exponential/zipf RNF and walking this distance from the head of the eviction queue. This at least provides a mechanism that will rapidly prune collisions without affecting behaviour meaningfully. > 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)