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 8D2B4200CBA for ; Mon, 19 Jun 2017 07:20:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8A1A8160BE3; Mon, 19 Jun 2017 05:20:05 +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 D0677160BEE for ; Mon, 19 Jun 2017 07:20:04 +0200 (CEST) Received: (qmail 61194 invoked by uid 500); 19 Jun 2017 05:20:04 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 61184 invoked by uid 99); 19 Jun 2017 05:20:03 -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; Mon, 19 Jun 2017 05:20:03 +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 5C3031A0357 for ; Mon, 19 Jun 2017 05:20:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id QvD542YKWocW for ; Mon, 19 Jun 2017 05:20:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 82EF75FB6A for ; Mon, 19 Jun 2017 05:20:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C1BC3E0D51 for ; Mon, 19 Jun 2017 05:20:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2569E24002 for ; Mon, 19 Jun 2017 05:20:00 +0000 (UTC) Date: Mon, 19 Jun 2017 05:20:00 +0000 (UTC) From: "Paul Rogers (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5493) Managed External Sort + CTAS partition by results in "Unable to allocate sv2 vector" error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 19 Jun 2017 05:20:05 -0000 [ https://issues.apache.org/jira/browse/DRILL-5493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16053483#comment-16053483 ] Paul Rogers commented on DRILL-5493: ------------------------------------ Basics: {code} Config: memory limit = 63,161,283, spill file size = 268435456, spill batch size = 8388608, merge limit = 2147483647, merge batch size = 16777216 ... Actual batch schema & sizes { col1(type: VARCHAR, std col. size: 54, actual col. size: 7404, total size: 268730368, data size: 242606878, row capacity: 32768, density: -5) Records: 32768, Total size: 268,795,904, Gross row width:8203, Net row width:7404, Density:0} {code} The two critical numbers are: {code} memory limit = 63,161,283 Total size: 268,795,904 {code} The sort is running in frag:0:0, which is the screen fragment. A downstream batch has created a batch of size 270 MB. But, the sort has been given only 63 MB. Clearly, the sort cannot make progress. So, this is an expected error given the casual way that Drill currently creates batches of sizes that are completely independent of memory limits applied to operators. This is a bug in the Drill execution engine in general, not a bug in the external sort in particular. > Managed External Sort + CTAS partition by results in "Unable to allocate sv2 vector" error > ------------------------------------------------------------------------------------------ > > Key: DRILL-5493 > URL: https://issues.apache.org/jira/browse/DRILL-5493 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Relational Operators > Affects Versions: 1.10.0 > Reporter: Rahul Challapalli > Assignee: Paul Rogers > Attachments: 26ee07bb-81ff-1c10-9003-90510f4b8e1d.sys.drill, drillbit.log > > > Config : > {code} > git.commit.id.abbrev=1e0a14c > No of nodes : 1 > DRILL_MAX_DIRECT_MEMORY="32G" > DRILL_MAX_HEAP="4G" > Assertions Enabled : true > {code} > The below query fails during the CTAS phase (the explicit order by in the query runs fine) > {code} > ALTER SESSION SET `exec.sort.disable_managed` = false; > alter session set `planner.width.max_per_query` = 17; > create table dfs.drillTestDir.xsort_ctas4 partition by (col1) as select columns[0] as col1 from (select * from dfs.`/drill/testdata/resource-manager/wide-to-zero` order by columns[0]); > Error: RESOURCE ERROR: Unable to allocate sv2 buffer > Fragment 0:0 > [Error Id: 24ae2ec8-ac2a-45c3-b550-43c12764165d on qa-node190.qa.lab:31010] (state=,code=0) > {code} > I attached the logs and profiles. The data is too large to attach to a jira. -- This message was sent by Atlassian JIRA (v6.4.14#64029)