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 A979C200CD7 for ; Tue, 1 Aug 2017 23:16:32 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A65F1167FC4; Tue, 1 Aug 2017 21:16:32 +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 ECC4D167FBC for ; Tue, 1 Aug 2017 23:16:31 +0200 (CEST) Received: (qmail 926 invoked by uid 500); 1 Aug 2017 21:16:31 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 914 invoked by uid 99); 1 Aug 2017 21:16:30 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Aug 2017 21:16:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 6AF25C004A for ; Tue, 1 Aug 2017 21:16:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id dP2yqHtTXIdU for ; Tue, 1 Aug 2017 21:16:29 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id B604A5F5B4 for ; Tue, 1 Aug 2017 21:16:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id v71LGRKZ013606; Tue, 1 Aug 2017 21:16:27 GMT Message-Id: <201708012116.v71LGRKZ013606@ip-10-146-233-104.ec2.internal> Date: Tue, 1 Aug 2017 21:16:26 +0000 From: "Tim Armstrong (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: Dan Hecht Reply-To: tarmstrong@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5158=2CIMPALA-5236=3A_account_for_unused_buffer_pool_reservations=0A?= X-Gerrit-Change-Id: Idb1fa3110dc893321f9f4e8ced6b7ede12194dad X-Gerrit-ChangeURL: X-Gerrit-Commit: 0ea02472e46d14d438144c0484c7b349772b09b7 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.7 archived-at: Tue, 01 Aug 2017 21:16:32 -0000 Tim Armstrong has uploaded a new patch set (#4). Change subject: IMPALA-5158,IMPALA-5236: account for unused buffer pool reservations ...................................................................... IMPALA-5158,IMPALA-5236: account for unused buffer pool reservations We were missing accounting for this, since it is part of the expected difference between query and process memory consumption. The identity that applies is is: buffers allocated from system = reservation + cached buffers - unused reservation Where "cached buffers" includes free buffers and buffers attached to clean pages. The reservation is accounted against queries and "buffers allocated from system" is accounted against the process MemTracker. Reporting this in a direct way required adding a concept of a MemTracker with negative consumption, which fortunately did not require any major changes to the MemTracker code. Example output when applied to buffer pool branch: Process: Limit=8.35 GB Total=579.18 MB Peak=590.41 MB Buffer Pool: Free Buffers: Total=268.25 MB Buffer Pool: Clean Pages: Total=172.25 MB Buffer Pool: Unused Reservation: Total=-8.25 MB Free Disk IO Buffers: Total=21.98 MB Peak=21.98 MB RequestPool=default-pool: Total=12.07 MB Peak=71.58 MB ... ... RequestPool=fe-eval-exprs: Total=0 Peak=4.00 KB Untracked Memory: Total=112.88 MB Testing: Added a basic test for MemTrackers with negative metrics. Change-Id: Idb1fa3110dc893321f9f4e8ced6b7ede12194dad --- M be/src/runtime/exec-env.cc M be/src/runtime/mem-tracker-test.cc M be/src/runtime/mem-tracker.cc M be/src/runtime/mem-tracker.h M be/src/util/memory-metrics.cc M be/src/util/memory-metrics.h M be/src/util/pretty-printer-test.cc M be/src/util/pretty-printer.h M common/thrift/metrics.json 9 files changed, 76 insertions(+), 11 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/80/7380/4 -- To view, visit http://gerrit.cloudera.org:8080/7380 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Idb1fa3110dc893321f9f4e8ced6b7ede12194dad Gerrit-PatchSet: 4 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Tim Armstrong Gerrit-Reviewer: Dan Hecht