Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5B9FCD326 for ; Sat, 13 Oct 2012 14:47:43 +0000 (UTC) Received: (qmail 4991 invoked by uid 500); 13 Oct 2012 14:47:38 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 4879 invoked by uid 500); 13 Oct 2012 14:47:37 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 4872 invoked by uid 99); 13 Oct 2012 14:47:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Oct 2012 14:47:37 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kmoses@cs.duke.edu designates 152.3.140.1 as permitted sender) Received: from [152.3.140.1] (HELO duke.cs.duke.edu) (152.3.140.1) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Oct 2012 14:47:31 +0000 Received: from [127.0.0.1] (duke-cs-136-dhcp-102.cs.duke.edu [152.3.136.102]) (authenticated bits=0) by duke.cs.duke.edu (8.14.5/8.14.5) with ESMTP id q9DEl89V016283 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 13 Oct 2012 10:47:08 -0400 (EDT) X-DKIM: Sendmail DKIM Filter v2.8.3 duke.cs.duke.edu q9DEl89V016283 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail; t=1350139628; bh=kNHBFeY+iy/EADB/WCIwQlzkhU0b0h1qXou2s1WJ9Yo=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type; b=jUovXAR04R7GcqQNLq8OWe2lxQZ9A1ONyzOxqVjMSGksTvuMT9SAQJab7zXFbF33w qrFwMFsZKPEaliyFozeKxxDf9ARZxJYM4DqA5lxUQEXwDmwflMf8QnHkRu0UICb/WB N1HONY3ffEsfZhW/6RrKXkiTuPJHKlMDf1oeKMMcX3OJDtqgdovqypcV3Agno0huH1 XFA1u8JeFO4Zm4klTm5w2CCByE+Z9QhPMZuB2tskFek8VvygakCYXWiou31TpRP7dg QSNzwObS4oJuart7H29hAmoR2E6pHgk4W9rpbC63X9yARqNg4Z5faGECydfcl4wb3w rGOWaJmtydI1w== Message-ID: <50797ED6.2040209@cs.duke.edu> Date: Sat, 13 Oct 2012 10:46:46 -0400 From: Kyle Moses User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: user@hadoop.apache.org Subject: Re: Distributed Cache For 100MB+ Data Structure References: <5076FE16.5040001@cs.duke.edu> In-Reply-To: Content-Type: multipart/alternative; boundary="------------030508060507010602020004" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------030508060507010602020004 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Chris, Thanks for the suggestion on serializing the radix tree and your thoughts on the memory issue. I'm planning to test a few different solutions and will post another reply if the results prove interesting. Kyle On 10/11/2012 1:52 PM, Chris Nauroth wrote: > Hello Kyle, > > Regarding the setup time of the radix tree, is it possible to > precompute the radix tree before job submission time, then create a > serialized representation (perhaps just Java object serialization), > and send the serialized form through distributed cache? Then, each > reducer would just need to deserialize during setup() instead of > recomputing the full radix tree for every reducer task. That might > save time. > > Regarding the memory consumption, when I've run into a situation like > this, I've generally solved it by caching the data in a separate > process and using some kind of IPC from the reducers to access it. > memcache is one example, though that's probably not an ideal fit for > this data structure. I'm aware of no equivalent solution directly in > Hadoop and would be curious to hear from others on the topic. > > Thanks, > --Chris > > On Thu, Oct 11, 2012 at 10:12 AM, Kyle Moses > wrote: > > Problem Background: > I have a Hadoop MapReduce program that uses a IPv6 radix tree to > provide auxiliary input during the reduce phase of the second job > in it's workflow, but doesn't need the data at any other point. > It seems pretty straight forward to use the distributed cache to > build this data structure inside each reducer in the setup() method. > This solution is functional, but ends up using a large amount of > memory if I have 3 or more reducers running on the same node and > the setup time of the radix tree is non-trivial. > Additionally, the IPv6 version of the structure is quite a bit > larger in memory. > > Question: > Is there a "good" way to share this data structure across all > reducers on the same node within the Hadoop framework? > > Initial Thoughts: > It seems like this might be possible by altering the Task JVM > Reuse parameters, but from what I have read this would also affect > map tasks and I'm concerned about drawbacks/side-effects. > > Thanks for your help! > > --------------030508060507010602020004 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
Chris,
Thanks for the suggestion on serializing the radix tree and your thoughts on the memory issue.  I'm planning to test a few different solutions and will post another reply if the results prove interesting.

Kyle

On 10/11/2012 1:52 PM, Chris Nauroth wrote:
Hello Kyle,

Regarding the setup time of the radix tree, is it possible to precompute the radix tree before job submission time, then create a serialized representation (perhaps just Java object serialization), and send the serialized form through distributed cache?  Then, each reducer would just need to deserialize during setup() instead of recomputing the full radix tree for every reducer task.  That might save time.

Regarding the memory consumption, when I've run into a situation like this, I've generally solved it by caching the data in a separate process and using some kind of IPC from the reducers to access it.  memcache is one example, though that's probably not an ideal fit for this data structure.  I'm aware of no equivalent solution directly in Hadoop and would be curious to hear from others on the topic.

Thanks,
--Chris

On Thu, Oct 11, 2012 at 10:12 AM, Kyle Moses <kmoses@cs.duke.edu> wrote:
Problem Background:
I have a Hadoop MapReduce program that uses a IPv6 radix tree to provide auxiliary input during the reduce phase of the second job in it's workflow, but doesn't need the data at any other point.
It seems pretty straight forward to use the distributed cache to build this data structure inside each reducer in the setup() method.
This solution is functional, but ends up using a large amount of memory if I have 3 or more reducers running on the same node and the setup time of the radix tree is non-trivial.
Additionally, the IPv6 version of the structure is quite a bit larger in memory.

Question:
Is there a "good" way to share this data structure across all reducers on the same node within the Hadoop framework?

Initial Thoughts:
It seems like this might be possible by altering the Task JVM Reuse parameters, but from what I have read this would also affect map tasks and I'm concerned about drawbacks/side-effects.

Thanks for your help!


--------------030508060507010602020004--