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 B8BB318877 for ; Wed, 2 Sep 2015 21:02:46 +0000 (UTC) Received: (qmail 42380 invoked by uid 500); 2 Sep 2015 21:02:46 -0000 Delivered-To: apmail-spark-issues-archive@spark.apache.org Received: (qmail 42350 invoked by uid 500); 2 Sep 2015 21:02:46 -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 42340 invoked by uid 99); 2 Sep 2015 21:02:46 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Sep 2015 21:02:46 +0000 Date: Wed, 2 Sep 2015 21:02:46 +0000 (UTC) From: "Andrew Or (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (SPARK-6157) Unrolling with MEMORY_AND_DISK should always release memory 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-6157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Or updated SPARK-6157: ----------------------------- Summary: Unrolling with MEMORY_AND_DISK should always release memory (was: Unroll unsuccessful memory_and_disk level block should release reserved unroll memory after put success in disk) > Unrolling with MEMORY_AND_DISK should always release memory > ----------------------------------------------------------- > > Key: SPARK-6157 > URL: https://issues.apache.org/jira/browse/SPARK-6157 > Project: Spark > Issue Type: Bug > Components: Block Manager > Affects Versions: 1.2.1 > Reporter: SuYan > Assignee: SuYan > > === EDIT by andrewor14 === > The existing description was somewhat confusing, so here's a more succinct version of it. > If unrolling a block with MEMORY_AND_DISK was unsuccessful, we will drop the block to disk > directly. After doing so, however, we don't need the underlying array that held the partial > values anymore, so we should release the pending unroll memory for other tasks on the same > executor. Otherwise, other tasks may unnecessarily drop their blocks to disk due to the lack > of unroll space, resulting in worse performance. > === Original comment === > Current code: > Now we want to cache a Memory_and_disk level block > 1. Try to put in memory and unroll unsuccessful. then reserved unroll memory because we got a iterator from an unroll Array > 2. Then put into disk. > 3. Get value from get(blockId), and iterator from that value, and then nothing with an unroll Array. So here we should release the reserved unroll memory instead will release until the task is end. > and also, have somebody already pull a request, for get Memory_and_disk level block, while cache in memory from disk, we should, use file.length to check if we can put in memory store instead just allocate a file.length buffer, may lead to OOM. -- 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