Return-Path: X-Original-To: apmail-accumulo-notifications-archive@minotaur.apache.org Delivered-To: apmail-accumulo-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A0B7D11F30 for ; Wed, 18 Jun 2014 18:28:25 +0000 (UTC) Received: (qmail 63150 invoked by uid 500); 18 Jun 2014 18:28:25 -0000 Delivered-To: apmail-accumulo-notifications-archive@accumulo.apache.org Received: (qmail 63109 invoked by uid 500); 18 Jun 2014 18:28:25 -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 63083 invoked by uid 99); 18 Jun 2014 18:28:25 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jun 2014 18:28:25 +0000 Date: Wed, 18 Jun 2014 18:28:25 +0000 (UTC) From: "Keith Turner (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ACCUMULO-2827) HeapIterator optimization 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/ACCUMULO-2827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14036092#comment-14036092 ] Keith Turner commented on ACCUMULO-2827: ---------------------------------------- bq. The initial microbenchmarks showed a lot of promise (I think?) and the results from the compact looked to fall far short of that. I suspect this is because the compaction test used uniform random data. CI generates random rows w/ one column. So the data in the tablets files is highly interleaved. Its good to see that it did not do worse in this case. I suspect this case corresponds to X=1 in the posted plots. It would interesting to see the end-to-end experiment run with something that generates random rows with multiple columns. > HeapIterator optimization > ------------------------- > > Key: ACCUMULO-2827 > URL: https://issues.apache.org/jira/browse/ACCUMULO-2827 > Project: Accumulo > Issue Type: Improvement > Affects Versions: 1.5.1, 1.6.0 > Reporter: Jonathan Park > Assignee: Jonathan Park > Priority: Minor > Fix For: 1.5.2, 1.6.1, 1.7.0 > > Attachments: ACCUMULO-2827.0.patch.txt, accumulo-2827.raw_data, new_heapiter.png, old_heapiter.png, together.png > > > We've been running a few performance tests of our iterator stack and noticed a decent amount of time spent in the HeapIterator specifically related to add/removal into the heap. > This may not be a general enough optimization but we thought we'd see what people thought. Our assumption is that it's more probable that the current "top iterator" will supply the next value in the iteration than not. The current implementation takes the other assumption by always removing + inserting the minimum iterator back into the heap. With the implementation of a binary heap that we're using, this can get costly if our assumption is wrong because we pay the log penalty of percolating up the iterator in the heap upon insertion and again when percolating down upon removal. > We believe our assumption is a fair one to hold given that as major compactions create a log distribution of file sizes, it's likely that we may see a long chain of consecutive entries coming from 1 iterator. Understandably, taking this assumption comes at an additional cost in the case that we're wrong. Therefore, we've run a few benchmarking tests to see how much of a cost we pay as well as what kind of benefit we see. I've attached a potential patch (which includes a test harness) + image that captures the results of our tests. The x-axis represents # of repeated keys before switching to another iterator. The y-axis represents iteration time. The sets of blue + red lines varies in # of iterators present in the heap. -- This message was sent by Atlassian JIRA (v6.2#6252)