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 D3D7C200B5A for ; Thu, 21 Jul 2016 07:08:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D24E1160A86; Thu, 21 Jul 2016 05:08:11 +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 288E5160A64 for ; Thu, 21 Jul 2016 07:08:11 +0200 (CEST) Received: (qmail 41273 invoked by uid 500); 21 Jul 2016 05:08:10 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 41262 invoked by uid 99); 21 Jul 2016 05:08:10 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jul 2016 05:08:10 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 4B02A1A5661 for ; Thu, 21 Jul 2016 05:08:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id rgfbV4iCyyNf for ; Thu, 21 Jul 2016 05:08:07 +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-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 40F075F3F5 for ; Thu, 21 Jul 2016 05:08:07 +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 u6L5850C023932; Thu, 21 Jul 2016 05:08:05 GMT Message-Id: <201607210508.u6L5850C023932@ip-10-146-233-104.ec2.internal> Date: Thu, 21 Jul 2016 05:08:05 +0000 From: "Dan Hecht (Code Review)" To: Tim Armstrong , impala-cr@cloudera.com, dev@impala.incubator.apache.org CC: Michael Ho Reply-To: dhecht@cloudera.com X-Gerrit-MessageType: comment Subject: =?UTF-8?Q?=5BImpala-CR=5D=28cdh5-trunk=29_IMPALA-3611=3A_track_unused_Disk_IO_buffer_memory=0A?= X-Gerrit-Change-Id: I8777cf76f04d34a46f53d53005412e0f1d63b5b7 X-Gerrit-ChangeURL: X-Gerrit-Commit: 1f9de5b785a1ce2ef55ded56e233382b52695113 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.2 archived-at: Thu, 21 Jul 2016 05:08:12 -0000 Dan Hecht has posted comments on this change. Change subject: IMPALA-3611: track unused Disk IO buffer memory ...................................................................... Patch Set 9: (9 comments) http://gerrit.cloudera.org:8080/#/c/3246/9/be/src/runtime/disk-io-mgr.cc File be/src/runtime/disk-io-mgr.cc: Line 246: mem_tracker_->Release(buffer_len_); it's a bit confusing that the tracking happens both in BufferDescriptor methods (here) and also directly in DiskIoMgr methods. maybe there's no great way to factor the code to keep the accounting all in once class though. PS9, Line 368: Untracked this is a little misleading given that they are tracked by this tracker. Why not just make a mem tracker for buffered block manager, and then nothing has to change in this code when the buffered block manager is deleted? is there something that made that tough? PS9, Line 650: Not a cached buffer. Return the io buffer. not your comment, but this comment is pretty useless, it just restates what the C++ code says. it'd be better to explain why cached buffers are not returned. Line 752: delete[] buffer; would be nice to delete first then Release(). http://gerrit.cloudera.org:8080/#/c/3246/9/be/src/runtime/disk-io-mgr.h File be/src/runtime/disk-io-mgr.h: PS9, Line 242: caller should check the memory limit do callers actually check the mem limit? or are they assuming that the mem limit is okay because the src and dst mem trackers are within the same hierarchy and dst itself doesn't have a limit? PS9, Line 271: Non-NULL for non-cached double negative is hard to parse. maybe say "Can be NULL only for cached" PS9, Line 774: associated what does this mean? does this routine consume memory from 'mem_tracker', or does this mean something else? Line 792: /// max_buffer_size_. would be good to comment on how mem tracking is affected. Line 802: /// Returns the buffer in 'desc' (cannot be NULL), and sets desc->buffer_ to NULL. likewise. from the comments alone it's not clear what the difference between ReturnBuffer() and ReturnFreeBuffer() are. -- To view, visit http://gerrit.cloudera.org:8080/3246 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8777cf76f04d34a46f53d53005412e0f1d63b5b7 Gerrit-PatchSet: 9 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Tim Armstrong Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Michael Ho Gerrit-Reviewer: Michael Ho Gerrit-Reviewer: Tim Armstrong Gerrit-HasComments: Yes