Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 757D1200AC6 for ; Sat, 7 May 2016 04:47:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5D8AF160A0D; Sat, 7 May 2016 02:47:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A57F2160A0C for ; Sat, 7 May 2016 04:47:14 +0200 (CEST) Received: (qmail 18649 invoked by uid 500); 7 May 2016 02:47:13 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 18636 invoked by uid 99); 7 May 2016 02:47:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 May 2016 02:47:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E234F2C1F61 for ; Sat, 7 May 2016 02:47:12 +0000 (UTC) Date: Sat, 7 May 2016 02:47:12 +0000 (UTC) From: "Ben Manes (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ACCUMULO-4177) TinyLFU-based BlockCache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 07 May 2016 02:47:15 -0000 [ https://issues.apache.org/jira/browse/ACCUMULO-4177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15275036#comment-15275036 ] Ben Manes commented on ACCUMULO-4177: ------------------------------------- Thanks [~elserj] and [~ctubbsii]. In the attached patch the implementation choice is configurable and defaults to LRU so that you can evaluate. When you fully transition, you might then decide to take advantage of other features such as compute the value through the cache (no duplicate puts). I did not migrate the Guava cache usages (4 classes), but that should be done as well. It is a trivial change and will yield improved performance. > TinyLFU-based BlockCache > ------------------------ > > Key: ACCUMULO-4177 > URL: https://issues.apache.org/jira/browse/ACCUMULO-4177 > Project: Accumulo > Issue Type: Improvement > Reporter: Ben Manes > Fix For: 2.0.0 > > Attachments: ACCUMULO-4177.patch > > > [LruBlockCache|https://github.com/apache/accumulo/blob/master/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java] appears to be based on HBase's. I currently have a patch being reviewed in [HBASE-15560|https://issues.apache.org/jira/browse/HBASE-15560] that replaces the pseudo Segmented LRU with the TinyLFU eviction policy. That should allow the cache to make [better predictions|https://github.com/ben-manes/caffeine/wiki/Efficiency] based on frequency and recency, such as improved scan resistance. The implementation uses [Caffeine|https://github.com/ben-manes/caffeine], the successor to Guava's cache, to provide concurrency and keep the patch small. > Full details are in the JIRA ticket. I think it should be easy to port if there is interest. -- This message was sent by Atlassian JIRA (v6.3.4#6332)