Return-Path: X-Original-To: apmail-spark-issues-archive@minotaur.apache.org Delivered-To: apmail-spark-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C916818B07 for ; Thu, 1 Oct 2015 22:22:33 +0000 (UTC) Received: (qmail 81929 invoked by uid 500); 1 Oct 2015 22:22:27 -0000 Delivered-To: apmail-spark-issues-archive@spark.apache.org Received: (qmail 81873 invoked by uid 500); 1 Oct 2015 22:22:27 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 81861 invoked by uid 99); 1 Oct 2015 22:22:27 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Oct 2015 22:22:27 +0000 Date: Thu, 1 Oct 2015 22:22:27 +0000 (UTC) From: "Davies Liu (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SPARK-10342) Cooperative memory management MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SPARK-10342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14940524#comment-14940524 ] Davies Liu commented on SPARK-10342: ------------------------------------ This will be used internal for SQL. For example, aggregation and sort-merge-join both will acquire large page to do in-memory aggregation or sorting, one could use most of the memory, then the other once can't have enough memory to work. Currently, each operator will preserve a page to make sure that they can start (could have to work with the only one page). The better solution could be, when one operator (for example aggregation) need more memory, other operators could be notified to release some memory by spilling. This could improve the memory utilization (don't need to preserve a page anymore) and void OOM. > Cooperative memory management > ----------------------------- > > Key: SPARK-10342 > URL: https://issues.apache.org/jira/browse/SPARK-10342 > Project: Spark > Issue Type: Improvement > Components: Spark Core, SQL > Affects Versions: 1.5.0 > Reporter: Davies Liu > Priority: Critical > > We have memory starving problems for a long time, it become worser in 1.5 since we use larger page. > In order to increase the memory usage (reduce unnecessary spilling) also reduce the risk of OOM, we should manage the memory in a cooperative way, it means all the memory consume should be also responsive to release memory (spilling) upon others' requests. > The requests of memory could be different, hard requirement (will crash if not allocated) or soft requirement (worse performance if not allocated). Also the costs of spilling are also different. We could introduce some kind of priority to make them work together better. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org