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 3F182200C48 for ; Thu, 6 Apr 2017 09:34:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3DBCC160BA4; Thu, 6 Apr 2017 07:34:46 +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 601C0160B84 for ; Thu, 6 Apr 2017 09:34:45 +0200 (CEST) Received: (qmail 23305 invoked by uid 500); 6 Apr 2017 07:34:44 -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 23296 invoked by uid 99); 6 Apr 2017 07:34:44 -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, 06 Apr 2017 07:34:44 +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 3002C1A07ED for ; Thu, 6 Apr 2017 07:34:44 +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-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 m7JtVQ19c8d2 for ; Thu, 6 Apr 2017 07:34:42 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 87EDA5FC73 for ; Thu, 6 Apr 2017 07:34:42 +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 0442FE00B4 for ; Thu, 6 Apr 2017 07:34:42 +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 B54C924066 for ; Thu, 6 Apr 2017 07:34:41 +0000 (UTC) Date: Thu, 6 Apr 2017 07:34:41 +0000 (UTC) From: "Apache Spark (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SPARK-20237) Spark-1.6 current and later versions of memory management issues MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 06 Apr 2017 07:34:46 -0000 [ https://issues.apache.org/jira/browse/SPARK-20237?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D159= 58465#comment-15958465 ]=20 Apache Spark commented on SPARK-20237: -------------------------------------- User 'zhangwei72' has created a pull request for this issue: https://github.com/apache/spark/pull/17547 > Spark-1.6 current and later versions of memory management issues > ---------------------------------------------------------------- > > Key: SPARK-20237 > URL: https://issues.apache.org/jira/browse/SPARK-20237 > Project: Spark > Issue Type: Bug > Components: Spark Core > Affects Versions: 1.6.0, 1.6.1, 1.6.2, 1.6.3, 2.0.0, 2.0.1, 2.0.2, 2.1= .0 > Environment: java 1.7.0 scala-2.10.5 maven-3.3.9 hadoop-2.2= .0 spark-1.6.2 > Reporter: zhangwei72 > Priority: Critical > Labels: security > Fix For: 1.6.2 > > Original Estimate: 96h > Remaining Estimate: 96h > > In spark-1.6 and later versions, there is a problem with its memory manag= ement UnifiedMemoryManager. > Spark.memory.storageFraction configuration should be at least storage Mem= ory memory. > In the memory management UnifiedMemoryManager, the calculation of Executi= on memory can be up to storage how much memory can borrow,using val memoryR= eclaimableFromStorage =3D math.max(storageMemoryPool.memoryFree,storageMemo= ryPool.poolSize > - storageRegionSize=EF=BC=89. > When storageMemoryPool.memoryFree > storageMemoryPool.poolSize - storageR= egionSize, the size of the a will be chosen, that is,storage Memory will re= duce the storageMemoryPool.memoryFree so much. > Because of storageMemoryPool.memoryFree > storageMemoryPool.poolSize - st= orageRegionSize, so storageMemoryPool.poolSize - storageMemoryPool.memoryFr= ee < storageRegionSize > Now storageMemoryPool.poolSize < storageRegionSize,storageRegionSize is t= he smallest proportion of frame definition,so there is a problem. > To solve this problem, we define the function as val memoryReclaimableFr= omStorage =3D storageMemoryPool.poolSize - storageRegionSize. > Experimental proof=EF=BC=9A > I added some log information to the UnifiedMemoryManager file as follows: > logInfo("storageMemoryPool.memoryFree %f".format(storageMemoryPool.memory= Free/1024.0/1024.0)) logInfo("onHeapExecutionMemoryPool.memor= yFree %f".format(onHeapExecutionMemoryPool.memoryFree/1024.0/1024.0)) = logInfo("storageMemoryPool.memoryUsed %f".format( storageMemoryPool.= memoryUsed/1024.0/1024.0)) logInfo("onHeapExecutionMemoryPool.m= emoryUsed %f".format(onHeapExecutionMemoryPool.memoryUsed/1024.0/1024.0)) = logInfo("storageMemoryPool.poolSize %f".format( storageMemoryPoo= l.poolSize/1024.0/1024.0)) logInfo("onHeapExecutionMemoryPool.po= olSize %f".format(onHeapExecutionMemoryPool.poolSize/1024.0/1024.0)) > When I run the PageRank program, the input file for PageRank is generat= ed by the BigDataBench-Chinese Academy of Sciences and is used to evaluate = large data analysis system tools with a size of 676M. The information submi= tted is as follows: > ./bin/spark-submit --class org.apache.spark.examples.SparkPageRank \ > --master yarn \ > --deploy-mode cluster \ > --num-executors 1 \ > --driver-memory 4g \ > --executor-memory 7g \ > --executor-cores 6 \ > --queue thequeue \ > ./examples/target/scala-2.10/spark-examples-1.6.2-hadoop2.2.0.jar \ > /test/Google_genGraph_23.txt 6 > The configuration is as follows=EF=BC=9A > spark.memory.useLegacyMode=3Dfalse > spark.memory.fraction=3D0.75 > spark.memory.storageFraction=3D0.2 > Log information is as follows=EF=BC=9A > 17/02/28 11:07:34 INFO memory.UnifiedMemoryManager: storageMemoryPool.mem= oryFree 0.000000 > 17/02/28 11:07:34 INFO memory.UnifiedMemoryManager: onHeapExecutionMemory= Pool.memoryFree 5663.325877 > 17/02/28 11:07:34 INFO memory.UnifiedMemoryManager: storageMemoryPool.mem= oryUsed 0.299123 M > 17/02/28 11:07:34 INFO memory.UnifiedMemoryManager: onHeapExecutionMemory= Pool.memoryUsed 0.000000 > 17/02/28 11:07:34 INFO memory.UnifiedMemoryManager: storageMemoryPool.poo= lSize 0.299123 > 17/02/28 11:07:34 INFO memory.UnifiedMemoryManager: onHeapExecutionMemory= Pool.poolSize 5663.325877 > According to the configuration, storageMemoryPool.poolSize at least 1G or= more, but the log information is only 0.299123 M, so there is an error. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org