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 22AA2200BC3 for ; Fri, 18 Nov 2016 17:56:18 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 213E5160B04; Fri, 18 Nov 2016 16:56:18 +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 46C9E160B03 for ; Fri, 18 Nov 2016 17:56:17 +0100 (CET) Received: (qmail 16185 invoked by uid 500); 18 Nov 2016 16:56:16 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flink.apache.org Delivered-To: mailing list user@flink.apache.org Received: (qmail 16174 invoked by uid 99); 18 Nov 2016 16:56:16 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Nov 2016 16:56:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D8854C16D8 for ; Fri, 18 Nov 2016 16:56:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.279 X-Spam-Level: * X-Spam-Status: No, score=1.279 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 8PKZxTWGlZ7n for ; Fri, 18 Nov 2016 16:56:11 +0000 (UTC) Received: from aibo.runbox.com (aibo.runbox.com [91.220.196.211]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 3D9325F297 for ; Fri, 18 Nov 2016 16:56:11 +0000 (UTC) Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1c7mSH-0000jN-Rb for user@flink.apache.org; Fri, 18 Nov 2016 17:56:02 +0100 Received: from catv-80-98-250-173.catv.broadband.hu ([80.98.250.173] helo=[10.23.94.13]) by mailfront10.runbox.com with esmtpsa (uid:862662 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1c7mSH-0002AB-AC for user@flink.apache.org; Fri, 18 Nov 2016 17:56:01 +0100 Subject: Re: Any way to increase sort buffer size? To: user@flink.apache.org References: From: =?UTF-8?Q?G=c3=a1bor_Hermann?= Message-ID: <56a43e16-0c4b-2c39-6283-6cdc8f5382ec@gaborhermann.com> Date: Fri, 18 Nov 2016 17:56:00 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------367B2D90DD00A9485360A79F" archived-at: Fri, 18 Nov 2016 16:56:18 -0000 This is a multi-part message in MIME format. --------------367B2D90DD00A9485360A79F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi Fabian, Thanks for your answer! I see that it's not a lightweight change. I guess it's easier if I find a workaround for using smaller objects. Cheers, Gabor On 2016-11-18 11:02, Fabian Hueske wrote: > Hi Gabor, > > I don't think there is a way to tune the memory settings for specific > operators. > > For that you would need to change the memory allocation in the > optimizers, which is possible but not a lightweight change either. > If you want to get something working, you could add a method to the > API to manually specify a memory fraction. The information could be > passed through the API to the optimizer which takes the explicitly > specified fraction into account when assigning memory budgets (see > Optimizer.java [1] and PlanFinalizer.java [2]) for how that works. > > Cheers, > Fabian > > [1] > https://github.com/apache/flink/blob/master/flink-optimizer/src/main/java/org/apache/flink/optimizer/Optimizer.java > > [2] > https://github.com/apache/flink/blob/master/flink-optimizer/src/main/java/org/apache/flink/optimizer/traversals/PlanFinalizer.java > > 2016-11-16 17:29 GMT+01:00 Gábor Hermann >: > > Hi all, > > Is there any way to increase the sort buffer size other than > increasing the overall TaskManager memory? > The following error comes up running a job with huge matrix block > objects on a cluster: > > Error obtaining the sorted input: Thread 'SortMerger Reading > Thread' terminated due to an exception: The record exceeds the > maximum size of a sort buffer (current maximum: 100499456 bytes). > > Every TM has at least 40 GB of memory while the maximum sort > buffer size is at 100 MB. What is the reason for this limit? Sorry > if I'm missing something, but I have not found any related > discussion or documentation yet. > > Cheers, > Gabor > > --------------367B2D90DD00A9485360A79F Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Hi Fabian,

Thanks for your answer!

I see that it's not a lightweight change. I guess it's easier if I find a workaround for using smaller objects.

Cheers,
Gabor


On 2016-11-18 11:02, Fabian Hueske wrote:
Hi Gabor,

I don't think there is a way to tune the memory settings for specific operators.

For that you would need to change the memory allocation in the optimizers, which is possible but not a lightweight change either.
If you want to get something working, you could add a method to the API to manually specify a memory fraction. The information could be passed through the API to the optimizer which takes the explicitly specified fraction into account when assigning memory budgets (see Optimizer.java [1] and PlanFinalizer.java [2]) for how that works.

Cheers,
Fabian

[1] https://github.com/apache/flink/blob/master/flink-optimizer/src/main/java/org/apache/flink/optimizer/Optimizer.java
[2] https://github.com/apache/flink/blob/master/flink-optimizer/src/main/java/org/apache/flink/optimizer/traversals/PlanFinalizer.java

2016-11-16 17:29 GMT+01:00 Gábor Hermann <mail@gaborhermann.com>:
Hi all,

Is there any way to increase the sort buffer size other than increasing the overall TaskManager memory?
The following error comes up running a job with huge matrix block objects on a cluster:

Error obtaining the sorted input: Thread 'SortMerger Reading Thread' terminated due to an exception: The record exceeds the maximum size of a sort buffer (current maximum: 100499456 bytes).

Every TM has at least 40 GB of memory while the maximum sort buffer size is at 100 MB. What is the reason for this limit? Sorry if I'm missing something, but I have not found any related discussion or documentation yet.

Cheers,
Gabor



--------------367B2D90DD00A9485360A79F--