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 6F4CE200CE6 for ; Thu, 17 Aug 2017 01:35:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6D7AC169DB0; Wed, 16 Aug 2017 23:35:14 +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 B2FCF169DAE for ; Thu, 17 Aug 2017 01:35:13 +0200 (CEST) Received: (qmail 4986 invoked by uid 500); 16 Aug 2017 23:35:11 -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 4975 invoked by uid 99); 16 Aug 2017 23:35:11 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Aug 2017 23:35:11 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id B5737180707 for ; Wed, 16 Aug 2017 23:35:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.363 X-Spam-Level: X-Spam-Status: No, score=0.363 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id zr17QHHrRM2p for ; Wed, 16 Aug 2017 23:35:09 +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 D41D05FB37 for ; Wed, 16 Aug 2017 23:35:08 +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 v7GNZ75c006506; Wed, 16 Aug 2017 23:35:07 GMT Message-Id: <201708162335.v7GNZ75c006506@ip-10-146-233-104.ec2.internal> Date: Wed, 16 Aug 2017 23:35:06 +0000 From: "Tim Armstrong (Code Review)" To: Dan Hecht , impala-cr@cloudera.com, reviews@impala.incubator.apache.org Reply-To: tarmstrong@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-5677=3A_limit_clean_page_memory_consumption=0A?= X-Gerrit-Change-Id: Ib6b687ab4bdddf07d9d6c997ff814aa3976042f9 X-Gerrit-ChangeURL: X-Gerrit-Commit: 75305d2dc5560625572285d490cf73b455d714c6 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: Wed, 16 Aug 2017 23:35:14 -0000 Hello Dan Hecht, I'd like you to reexamine a change. Please visit http://gerrit.cloudera.org:8080/7653 to look at the new patch set (#4). Change subject: IMPALA-5677: limit clean page memory consumption ...................................................................... IMPALA-5677: limit clean page memory consumption Adds the following flag: -buffer_pool_clean_pages_limit ((Advanced) Limit on bytes of clean spilled pages that will be accumulated in the buffer pool. Specified as number of bytes ('[bB]?'), megabytes ('[mM]'), gigabytes ('[gG]'), or percentage of the buffer pool limit ('%'). Defaults to bytes if no unit is given..) type: string default: "10%" This helps prevent Impala accumulating excessive amounts of clean pages, which can cause some problems in practice: * The OS buffer cache is squeezed, reducing I/O performance from HDFS and potentially reducing the ability of the OS to absorb writes from Impala without blocking. * Impala process memory consumption can expand more than users or admins might expect. E.g. if one query is running with a mem_limit of 1GB, many people will be surprised if the process inflates to the full process limit of 100GB. Impala doesn't provide any guarantees except from staying within the process mem_limit, but this could be a surprising divergence from past behaviour. Observability: A new metric buffer-pool.clean-pages-limit is added. Testing: Added a backend test to directly test that clean pages are evicted. Ran in a loop to flush out any flakiness. Ran exhaustive tests. Change-Id: Ib6b687ab4bdddf07d9d6c997ff814aa3976042f9 --- M be/src/common/global-flags.cc M be/src/runtime/bufferpool/buffer-allocator-test.cc M be/src/runtime/bufferpool/buffer-allocator.cc M be/src/runtime/bufferpool/buffer-allocator.h M be/src/runtime/bufferpool/buffer-pool-test.cc M be/src/runtime/bufferpool/buffer-pool.cc M be/src/runtime/bufferpool/buffer-pool.h M be/src/runtime/bufferpool/suballocator-test.cc M be/src/runtime/exec-env.cc M be/src/runtime/exec-env.h M be/src/runtime/test-env.cc M be/src/util/memory-metrics.cc M be/src/util/memory-metrics.h M common/thrift/metrics.json 14 files changed, 240 insertions(+), 82 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/53/7653/4 -- To view, visit http://gerrit.cloudera.org:8080/7653 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib6b687ab4bdddf07d9d6c997ff814aa3976042f9 Gerrit-PatchSet: 4 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Tim Armstrong Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Tim Armstrong